Part Number Hot Search : 
MH46TBD 2N3096 50002 R6020 TDA1510 C400A 2STL1525 OPA733RD
Product Description
Full Text Search
 

To Download TMPR3916 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  32-bit tx system risc tx39 family TMPR3916
mips16, application specific extensions and r3000a are a trademark of mips technologies, inc. the information contained herein is subject to change without notice. the information contained herein is presented only as a guide for the applications of our products. no responsibility is assumed by toshiba for any infringements of patents or other rights of the third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of toshiba or others. the products described in this document contain components made in the united states and subject to export control of the u.s. authorities. diversion contrary to the u.s. law is prohibited. toshiba is continually working to improve the quality and reliability of its products. nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. it is the responsibility of the buyer, when utilizing toshiba products, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failure of such toshiba products could cause loss of human life, bodily injury or damage to property. in developing your designs, please ensure that toshiba products are used within specified operating ranges as set forth in the most recent toshiba products specifications. also, please keep in mind the precautions and conditions set forth in the ?handling guide for semiconductor devices,? or ?toshiba semiconductor reliability handbook? etc.. the toshiba products listed in this document are intended for usage in general electronics applications ( computer, personal equipment, office equipment, measuring equipment, industrial robotics, domestic appliances, etc.). these toshiba products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury (?unintended usage?). unintended usage include atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc.. unintended usage of toshiba products listed in this document shall be made at the customer?s own risk. the products described in this document may include products subject to the foreign exchange and foreign trade laws. ? 2002 toshiba corporation all rights reserved
preface this document describes the basic functions of TMPR3916f "capricorn2". this document is meant to provide all information, which is needed to program and operate the device from a software developer's point of view. october 2002

TMPR3916 i table of contents handling precautions TMPR3916 1. the TMPR3916................................................................................................................. ......................................1-1 1.1 applications and references ................................................................................................. .........................1-1 1.2 features.................................................................................................................... .......................................1-2 1.3 differences between tx3903af and TMPR3916................................................................................... ......1-3 1.4 structure of TMPR3916 and a system example .................................................................................. ..........1-4 1.5 address map................................................................................................................. ..................................1-6 1.6 clocks ...................................................................................................................... .......................................1-8 1.7 resets...................................................................................................................... ........................................1-9 1.8 time-out-error control unit................................................................................................. .......................1-10 1.9 operating modes of TMPR3916 ................................................................................................. .................1-10 1.10 chip configuration register (ccr) .......................................................................................... ...................1-11 2. memory controller (mc) ....................................................................................................... .................................2-1 2.1 structure of memory controller .............................................................................................. .......................2-2 2.2 example memory configuration ................................................................................................ ....................2-3 2.3 ports of memory controller.................................................................................................. ..........................2-6 2.4 registers ................................................................................................................... ......................................2-6 2.5 sdramc functions............................................................................................................ ...........................2-7 2.6 memc function............................................................................................................... ............................2-20 3. graphics display controller (gdc)............................................................................................ ............................3-1 3.1 gdc structure ............................................................................................................... .................................3-2 3.2 scrolling ................................................................................................................... ......................................3-9 3.3 internal blockdiagram ....................................................................................................... ...........................3-12 3.4 registers ................................................................................................................... ....................................3-13 3.5 setting examples ............................................................................................................ ..............................3-21 4. interrupt controller (intc).................................................................................................. ...................................4-1 4.1 basic interrupt handling.................................................................................................... .............................4-1 4.2 registers ................................................................................................................... ......................................4-2 4.3 non maskable interrupt...................................................................................................... ............................4-4 5. timer ........................................................................................................................ ............................................5-1 5.1 pwm timer ................................................................................................................... .................................5-1 5.2 periodic timers............................................................................................................. ..................................5-3 6. direct memory access controller (dmac) ....................................................................................... ....................6-1 6.1 programming the dma controller.............................................................................................. ...................6-2 6.2 registers ................................................................................................................... ......................................6-5 7. can module (txcan)........................................................................................................... ...............................7-1 7.1 block diagram............................................................................................................... .................................7-2 7.2 txcan registers............................................................................................................. ..............................7-3 7.3 txcan interrupt logic ....................................................................................................... ........................7-22 7.4 txcan operation modes....................................................................................................... .....................7-25 7.5 handling of message-objects................................................................................................. ......................7-30 8. parallel interface (port).................................................................................................... ....................................8-1
TMPR3916 ii 9. synchronous serial i/o (txsei)............................................................................................... ..............................9-1 9.1 txsei structure ............................................................................................................. ................................9-2 9.2 registers ................................................................................................................... ......................................9-3 9.3 txsei operations ............................................................................................................ ............................9-15 9.4 interrupts.................................................................................................................. .....................................9-19 10. asynchronous serial interface (uart) ........................................................................................ ........................10-1 10.1 operations on serial interface ............................................................................................. .........................10-1 10.2 registers .................................................................................................................. ...................................10-10 10.3 timings.................................................................................................................... ...................................10-19 10.4 flow charts ................................................................................................................ ................................10-21 11. electrical characteristics .................................................................................................. .....................................11-1 11.1 dc characteristics of TMPR3916............................................................................................. ...................11-1 11.2 power up sequence.......................................................................................................... ............................11-2 11.3 crystal oscillator......................................................................................................... .................................11-3 11.4 view dac ................................................................................................................... .................................11-4 11.5 standby mode timing ........................................................................................................ ..........................11-5 11.6 boot device ................................................................................................................ ..................................11-5 11.7 sdram timing ............................................................................................................... ............................11-6 11.8 rom / sram timing .......................................................................................................... ........................11-7 11.9 external slave............................................................................................................. ..................................11-8 11.10 external interrupts and nmi............................................................................................... ........................11-10 11.11 general purpose i/o (port module) ......................................................................................... ...............11-10 11.12 txsei timing .............................................................................................................. ..............................11-11 12. package dimension ........................................................................................................... ....................................12-1 12.1 pin assignment............................................................................................................. ................................12-1 12.2 pin functions .............................................................................................................. ..................................12-5 appendix a. register overview of TMPR3916 ....................................................................................... .............a-1
handling precautions

1 using toshiba semiconductors safely 1-1 1. using toshiba semiconductors safely toshiba are continually working to improve the quality and the reliability of their products. nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. it is the responsibility of the buyer, when utilizing toshiba products, to observe standards of safety, and to avoid situations in which a malfunction or failure of a toshiba product could cause loss of human life, bodily injury or damage to property. in developing your designs, please ensure that toshiba products are used within specified operating ranges as set forth in the most recent products specifications. also, please keep in mind the precautions and conditions set forth in the toshiba semiconductor reliability handbook. the toshiba products listed in this document are intended for usage in general electronics applications (computer, personal equipment, office equipment, measuring equipment, industrial robotics, domestic appliances, etc.). these toshiba products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury (?unintended usage?). unintended usage include atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc.. unintended usage of toshiba products listed in this document shall be made at the customer?s own risk.
1 using toshiba semiconductors safely 1-2
2 safety precautions 2-1 2. safety precautions this section lists important precautions which users of semiconductor devices (and anyone else) should observe in order to avoid injury and damage to property, and to ensure safe and correct use of devices. please be sure that you understand the meanings of the labels and the graphic symbol described below before you move on to the detailed descriptions of the precautions. [explanation of labels] indicates an imminently hazardous situation which will result in death or serious injury if you do not follow instructions. indicates a potentially hazardous situation which could result in death or serious injury if you do not follow instructions. indicates a potentially hazardous situation which if not avoided, may result in minor injury or moderate injury. [explanation of graphic symbol] graphic symbol meaning indicates that caution is required (laser beam is dangerous to eyes).
2 safety precautions 2-2 2.1 general precautions regarding semiconductor devices do not use devices under conditions exceeding their absolute maximum ratings (e.g. current, voltage, power dissipation or temperature). this may cause the device to break down, degrade its performance, or cause it to catch fire or explode resulting in injury. do not insert devices in the wrong orientation. make sure that the positive and negative terminals of power supplies are connected correctly. otherwise the rated maximum current or power dissipation may be exceeded and the device may break down or undergo performance degradation, causing it to catch fire or explode and resulting in injury. when power to a device is on, do not touch the device?s heat sink. heat sinks become hot, so you may burn your hand. do not touch the tips of device leads. because some types of device have leads with pointed tips, you may prick your finger. when conducting any kind of evaluation, inspection or testing, be sure to connect the testing equipment?s electrodes or probes to the pins of the device under test before powering it on. otherwise, you may receive an electric shock causing injury. before grounding an item of measuring equipment or a soldering iron, check that there is no electrical leakage from it. electrical leakage may cause the device which you are testing or soldering to break down, or could give you an electric shock. always wear protective glasses when cutting the leads of a device with clippers or a similar tool. if you do not, small bits of metal flying off the cut ends may damage your eyes.
2 safety precautions 2-3 2.2 precautions specific to each product group 2.2.1 optical semiconductor devices when a visible semiconductor laser is operating, do not look directly into the laser beam or look through the optical system. this is highly likely to impair vision, and in the worst case may cause blindness. if it is necessary to examine the laser apparatus, for example to inspect its optical characteristics, always wear the appropri ate type of laser protective glasses as stipulated by iec standard iec825-1. ensure that the current flowing in an led device does not exceed the device?s maximum rated current. this is particularly important for resin-packaged led devices, as excessive current may cause the package resin to blow up, scattering resin fragments and causing injury. when testing the dielectric strength of a photocoupler, use testing equipment which can shut off the supply voltage to the photocoupler. if you detect a leakage current of more than 100 2.2.2 power devices never touch a power device while it is powered on. also, after turning off a power device, do not touch it until it has thoroug hly discharged all remaining electrical charge. touching a power device while it is powered on or still charged could cause a severe electric shock, resulting in death or seri ous injury. when conducting any kind of evaluation, inspection or testing, be sure to connect the testing equipment?s electrodes or probes to the device under test before powering it on. when you have finished, discharge any electrical charge remaining in the device. connecting the electrodes or probes of testing equipment to a device while it is powered on may result in electric shock, causi ng injury.
2 safety precautions 2-4 do not use devices under conditions which exceed their absolute maximum ratings (current, voltage, power dissipation, temperature etc.). this may cause the device to break down, causing a large short-circuit current to flow, which may in turn cause it to catch fir e or explode, resulting in fire or injury. use a unit which can detect short-circuit currents and which will shut off the power supply if a short-circuit occurs. if the power supply is not shut off, a large short-circuit current will flow continuously, which may in turn cause the device t o catch fire or explode, resulting in fire or injury. when designing a case for enclosing your system, consider how best to protect the user from shrapnel in the event of the device catching fire or exploding. flying shrapnel can cause injury. when conducting any kind of evaluation, inspection or testing, always use protective safety tools such as a cover for the devic e. otherwise you may sustain injury caused by the device catching fire or exploding. make sure that all metal casings in your design are grounded to earth. even in modules where a device?s electrodes and metal casing are insulated, capacitance in the module may cause the electrostatic potential in the casing to rise. dielectric breakdown may cause a high voltage to be applied to the casing, causing electric shock and injury to anyone touching it. when designing the heat radiation and safety features of a system incorporating high-speed rectifiers, remember to take the device?s forward and reverse losses into account. the leakage current in these devices is greater than that in ordinary rectifiers; as a result, if a high-speed rectifier is use d in an extreme environment (e.g. at high temperature or high voltage), its reverse loss may increase, causing thermal runaway to occur . this may in turn cause the device to explode and scatter shrapnel, resulting in injury to the user. a design should ensure that, except when the main circuit of the device is active, reverse bias is applied to the device gate w hile electricity is conducted to control circuits, so that the main circuit will become inactive. malfunction of the device may cause serious accidents or injuries. when conducting any kind of evaluation, inspection or testing, either wear protective gloves or wait until the device has coole d properly before handling it. devices become hot when they are operated. even after the power has been turned off, the device will retain residual heat which may cause a burn to anyone touching it. 2.2.3 bipolar ics (for use in automobiles) if your design includes an inductive load such as a motor coil, incorporate diodes or similar devices into the design to preven t negative current from flowing in. the load current generated by powering the device on and off may cause it to function erratically or to break down, which could in turn cause injury. ensure that the power supply to any device which incorporates protective functions is stable. if the power supply is unstable, the device may operate erratically, preventing the protective functions from working correctly . if
2 safety precautions 2-5 protective functions fail, the device may break down causing injury to the user.
3 general safety precautions and usage considerations 3-1 3. general safety precautions and usage considerations this section is designed to help you gain a better understanding of semiconductor devices, so as to ensure the safety, quality and reliability of the devices which you incorporate into your designs. 3.1 from incoming to shipping 3.1.1 electrostatic discharge (esd) when handling individual devices (which are not yet mounted on a printed circuit board), be sure that the environment is protected against electrostatic electricity. operators should wear anti-static clothing, and containers and other objects which come into direct contact with devices should be made of anti-static materials and should be grounded to earth via an 0.5- to 1.0-m ? protective resistor. please follow the precautions described below; this is particularly important for devices which are marked ?be careful of static.?. (1) work environment ? when humidity in the working environment decreases, the human body and other insulators can easily become charged with static electricity due to friction. maintain the recommended humidity of 40% to 60% in the work environment, while also taking into account the fact that moisture-proof-packed products may absorb moisture after unpacking. ? be sure that all equipment, jigs and tools in the working area are grounded to earth. ? place a conductive mat over the floor of the work area, or take other appropriate measures, so that the floor surface is protected against static electricity and is grounded to earth. the surface resistivity should be 10 4 to 10 8 ? /sq and the resistance between surface and ground, 7.5 10 5 to 10 8 ? ? cover the workbench surface also with a conductive mat (with a surface resistivity of 10 4 to 10 8 ? /sq, for a resistance between surface and ground of 7.5 10 5 to 10 8 ? ) . the purpose of this is to disperse static electricity on the surface (through resistive components) and ground it to earth. workbench surfaces must not be constructed of low-resistance metallic materials that allow rapid static discharge when a charged device touches them directly. ? pay attention to the following points when using automatic equipment in your workplace: (a) when picking up ics with a vacuum unit, use a conductive rubber fitting on the end of the pick-up wand to protect against electrostatic charge. (b) minimize friction on ic package surfaces. if some rubbing is unavoidable due to the device?s mechanical structure, minimize the friction plane or use material with a small friction coefficient and low electrical resistance. also, consider the use of an ionizer. (c) in sections which come into contact with device lead terminals, use a material which dissipates static electricity. (d) ensure that no statically charged bodies (such as work clothes or the human body) touch the devices.
3 general safety precautions and usage considerations 3-2 (e) make sure that sections of the tape carrier which come into contact with installation devices or other electrical machinery are made of a low-resistance material. (f) make sure that jigs and tools used in the assembly process do not touch devices. (g) in processes in which packages may retain an electrostatic charge, use an ionizer to neutralize the ions. ? make sure that crt displays in the working area are protected against static charge, for example by a vdt filter. as much as possible, avoid turning displays on and off. doing so can cause electrostatic induction in devices. ? keep track of charged potential in the working area by taking periodic measurements. ? ensure that work chairs are protected by an anti-static textile cover and are grounded to the floor surface by a grounding chain. (suggested resistance between the seat surface and grounding chain is 7.5 10 5 to 10 12 ? .) ? install anti-static mats on storage shelf surfaces. (suggested surface resistivity is 10 4 to 10 8 ? /sq; suggested resistance between surface and ground is 7.5 10 5 to 10 8 ? .) ? for transport and temporary storage of devices, use containers (boxes, jigs or bags) that are made of anti-static materials or materials which dissipate electrostatic charge. ? make sure that cart surfaces which come into contact with device packaging are made of materials which will conduct static electricity, and verify that they are grounded to the floor surface via a grounding chain. ? in any location where the level of static electricity is to be closely controlled, the ground resistance level should be class 3 or above. use different ground wires for all items of equipment which may come into physical contact with devices. (2) operating environment ? operators must wear anti-static clothing and conductive shoes (or a leg or heel strap). ? operators must wear a wrist strap grounded to earth via a resistor of about 1 m ? . ? soldering irons must be grounded from iron tip to earth, and must be used only at low voltages (6 v to 24 v). ? if the tweezers you use are likely to touch the device terminals, use anti-static tweezers and in particular avoid metallic tweezers. if a charged device touches a low-resistance tool, rapid discharge can occur. when using vacuum tweezers, attach a conductive chucking pat to the tip, and connect it to a dedicated ground used especially for anti-static purposes (suggested resistance value: 10 4 to 10 8 ? ). ? do not place devices or their containers near sources of strong electrical fields (such as above a crt).
3 general safety precautions and usage considerations 3-3 ? when storing printed circuit boards which have devices mounted on them, use a board container or bag that is protected against static charge. to avoid the occurrence of static charge or discharge due to friction, keep the boards separate from one other and do not stack them directly on top of one another. ? ensure, if possible, that any articles (such as clipboards) which are brought to any location where the level of static electricity must be closely controlled are constructed of anti-static materials. ? in cases where the human body comes into direct contact with a device, be sure to wear anti- static finger covers or gloves (suggested resistance value: 10 8 ? or less). ? equipment safety covers installed near devices should have resistance ratings of 10 9 ? or less. ? if a wrist strap cannot be used for some reason, and there is a possibility of imparting friction to devices, use an ionizer. ? the transport film used in tcp products is manufactured from materials in which static charges tend to build up. when using these products, install an ionizer to prevent the film from being charged with static electricity. also, ensure that no static electricity will be applied to the product?s copper foils by taking measures to prevent static occuring in the peripheral equipment. 3.1.2 vibration, impact and stress handle devices and packaging materials with care. to avoid damage to devices, do not toss or drop packages. ensure that devices are not subjected to mechanical vibration or shock during transportation. ceramic package devices and devices in canister-type packages which have empty space inside them are subject to damage from vibration and shock because the bonding wires are secured only at their ends. plastic molded devices, on the other hand, have a relatively high level of resistance to vibration and mechanical shock because their bonding wires are enveloped and fixed in resin. however, when any device or package type is installed in target equipment, it is to some extent susceptible to wiring disconnections and other damage from vibration, shock and stressed solder junctions. therefore when devices are incorporated into the design of equipment which will be subject to vibration, the structural design of the equipment must be thought out carefully. if a device is subjected to especially strong vibration, mechanical shock or stress, the package or the chip itself may crack. in products such as ccds which incorporate window glass, this could cause surface flaws in the glass or cause the connection between the glass and the ceramic to separate. furthermore, it is known that stress applied to a semiconductor device through the package changes the resistance characteristics of the chip because of piezoelectric effects. in analog circuit design attention must be paid to the problem of package stress as well as to the dangers of vibration and shock as described above. vibration
3 general safety precautions and usage considerations 3-4 3.2 storage 3.2.1 general storage ? avoid storage locations where devices will be exposed to moisture or direct sunlight. ? follow the instructions printed on the device cartons regarding transportation and storage. ? the storage area temperature should be kept within a temperature range of 5c to 35c, and relative humidity should be maintained at between 45% and 75%. ? do not store devices in the presence of harmful (especially corrosive) gases, or in dusty conditions. ? use storage areas where there is minimal temperature fluctuation. rapid temperature changes can cause moisture to form on stored devices, resulting in lead oxidation or corrosion. as a result, the solderability of the leads will be degraded. ? when repacking devices, use anti-static containers. ? do not allow external forces or loads to be applied to devices while they are in storage. ? if devices have been stored for more than two years, their electrical characteristics should be tested and their leads should be tested for ease of soldering before they are used. 3.2.2 moisture-proof packing moisture-proof packing should be handled with care. the handling procedure specified for each packing type should be followed scrupulously. if the proper procedures are not followed, the quality and reliability of devices may be degraded. this section describes general precautions for handling moisture-proof packing. since the details may differ from device to device, refer also to the relevant individual datasheets or databook. (1) general precautions follow the instructions printed on the device cartons regarding transportation and storage. ? do not drop or toss device packing. the laminated aluminum material in it can be rendered ineffective by rough handling. ? the storage area temperature should be kept within a temperature range of 5c to 30c, and relative humidity should be maintained at 90% (max). use devices within 12 months of the date marked on the package seal. @@ humidity: temperature:
3 general safety precautions and usage considerations 3-5 ? if the 12-month storage period has expired, or if the 30% humidity indicator shown in figure 1 is pink when the packing is opened, it may be advisable, depending on the device and packing type, to back the devices at high temperature to remove any moisture. please refer to the table below. after the pack has been opened, use the devices in a 5 c to 30 c. 60% rh environment and within the effective usage period listed on the moisture-proof package. if the effective usage period has expired, or if the packing has been stored in a high-humidity environment, bake the devices at high temperature. packing moisture removal tray if the packing bears the ?heatproof? marking or indicates the maximum temperature which it can withstand, bake at 125 ? when baking devices, protect the devices from static electricity. ? moisture indicators can detect the approximate humidity level at a standard temperature of 25 c. 6-point indicators and 3-point indicators are currently in use, but eventually all indicators will be 3-point indicators. danger if pink change desiccant read at lavender between pink & blue 10% 20% 30% 40% 50% 60% humidity indicator danger if pink read at lavender between pink & blue 20 30 40 humidity indicator (a) 6-point indicator (b) 3-point indicator figure 1 humidity indicator
3 general safety precautions and usage considerations 3-6 3.3 design care must be exercised in the design of electronic equipment to achieve the desired reliability. it is important not only to adhere to specifications concerning absolute maximum ratings and recommended operating conditions, it is also important to consider the overall environment in which equipment will be used, including factors such as the ambient temperature, transient noise and voltage and current surges, as well as mounting conditions which affect device reliability. this section describes some general precautions which you should observe when designing circuits and when mounting devices on printed circuit boards. for more detailed information about each product family, refer to the relevant individual technical datasheets available from toshiba. 3.3.1 absolute maximum ratings do not use devices under conditions in which their absolute maximum ratings (e.g. current, voltage, power dissipation or temperature) will be exceeded. a device may break down or its performance may be degraded, causing it to catch fire or explode resulting in injury to the user. the absolute maximum ratings are rated values which must not be exceeded during operation, even for an instant. although absolute maximum ratings differ from product to product, they essentially concern the voltage and current at each pin, the allowable power dissipation, and the junction and storage temperatures. if the voltage or current on any pin exceeds the absolute maximum rating, the device?s internal circuitry can become degraded. in the worst case, heat generated in internal circuitry can fuse wiring or cause the semiconductor chip to break down. if storage or operating temperatures exceed rated values, the package seal can deteriorate or the wires can become disconnected due to the differences between the thermal expansion coefficients of the materials from which the device is constructed. 3.3.2 recommended operating conditions the recommended operating conditions for each device are those necessary to guarantee that the device will operate as specified in the datasheet. if greater reliability is required, derate the device?s absolute maximum ratings for voltage, current, power and temperature before using it. 3.3.3 derating when incorporating a device into your design, reduce its rated absolute maximum voltage, current, power dissipation and operating temperature in order to ensure high reliability. since derating differs from application to application, refer to the technical datasheets available for the various devices used in your design. 3.3.4 unused pins if unused pins are left open, some devices can exhibit input instability problems, resulting in malfunctions such as abrupt increase in current flow. similarly, if the unused output pins on a device are connected to the power supply pin, the ground pin or to other output pins, the ic may malfunction or break down. since the details regarding the handling of unused pins differ from device to device and from pin
3 general safety precautions and usage considerations 3-7 to pin, please follow the instructions given in the relevant individual datasheets or databook. cmos logic ic inputs, for example, have extremely high impedance. if an input pin is left open, it can easily pick up extraneous noise and become unstable. in this case, if the input voltage level reaches an intermediate level, it is possible that both the p-channel and n-channel transistors will be turned on, allowing unwanted supply current to flow. therefore, ensure that the unused input pins of a device are connected to the power supply (vcc) pin or ground (gnd) pin of the same device. for details of what to do with the pins of heat sinks, refer to the relevant technical datasheet and databook. 3.3.5 latch-up latch-up is an abnormal condition inherent in cmos devices, in which vcc gets shorted to ground. this happens when a parasitic pn-pn junction (thyristor structure) internal to the cmos chip is turned on, causing a large current of the order of several hundred ma or more to flow between vcc and gnd, eventually causing the device to break down. latch-up occurs when the input or output voltage exceeds the rated value, causing a large current to flow in the internal chip, or when the voltage on the vcc (vdd) pin exceeds its rated value, forcing the internal chip into a breakdown condition. once the chip falls into the latch-up state, even though the excess voltage may have been applied only for an instant, the large current continues to flow between vcc (vdd) and gnd (vss). this causes the device to heat up and, in extreme cases, to emit gas fumes as well. to avoid this problem, observe the following precautions: (1) do not allow voltage levels on the input and output pins either to rise above vcc (vdd) or to fall below gnd (vss). also, follow any prescribed power-on sequence, so that power is applied gradually or in steps rather than abruptly. (2) do not allow any abnormal noise signals to be applied to the device. (3) set the voltage levels of unused input pins to vcc (vdd) or gnd (vss). (4) do not connect output pins to one another. 3.3.6 input/output protection wired-and configurations, in which outputs are connected together, cannot be used, since this short-circuits the outputs. outputs should, of course, never be connected to vcc (vdd) or gnd (vss). furthermore, ics with tri-state outputs can undergo performance degradation if a shorted output current is allowed to flow for an extended period of time. therefore, when designing circuits, make sure that tri-state outputs will not be enabled simultaneously. 3.3.7 load capacitance some devices display increased delay times if the load capacitance is large. also, large charging and discharging currents will flow in the device, causing noise. furthermore, since outputs are shorted for a relatively long time, wiring can become fused. consult the technical information for the device being used to determine the recommended load capacitance.
3 general safety precautions and usage considerations 3-8 3.3.8 thermal design the failure rate of semiconductor devices is greatly increased as operating temperatures increase. as shown in figure 2, the internal thermal stress on a device is the sum of the ambient temperature and the temperature rise due to power dissipation in the device. therefore, to achieve optimum reliability, observe the following precautions concerning thermal design: (1) keep the ambient temperature (ta) as low as possible. (2) if the device?s dynamic power dissipation is relatively large, select the most appropriate circuit board material, and consider the use of heat sinks or of forced air cooling. such measures will help lower the thermal resistance of the package. (3) derate the device?s absolute maximum ratings to minimize thermal stress from power dissipation. ja = jc + ca ja = (tj?ta) / p jc = (tj?tc) / p ca = (tc?ta) / p in which ja = thermal resistance between junction and surrounding air (c/w) jc = thermal resistance between junction and package surface, or internal thermal resistance (c/w) ca = thermal resistance between package surface and surrounding air, or external thermal resistance (c/w) tj = junction temperature or chip temperature (c) tc = package surface temperature or case temperature (c) ta = ambient temperature (c) p = power dissipation (w) tc figure 2 thermal resistance of package 3.3.9 interfacing when connecting inputs and outputs between devices, make sure input voltage (v il /v ih ) and output voltage (v ol /v oh ) levels are matched. otherwise, the devices may malfunction. when connecting devices operating at different supply voltages, such as in a dual-power-supply system, be aware that erroneous power-on and power-off sequences can result in device breakdown. for details of how to interface particular devices, consult the relevant technical datasheets and databooks. if you have any questions or doubts about interfacing, contact your nearest toshiba office or distributor.
3 general safety precautions and usage considerations 3-9 3.3.10 decoupling spike currents generated during switching can cause vcc (vdd) and gnd (vss) voltage levels to fluctuate, causing ringing in the output waveform or a delay in response speed. (the power supply and gnd wiring impedance is normally 50 ? to 100 ? .) for this reason, the impedance of power supply lines with respect to high frequencies must be kept low. this can be accomplished by using thick and short wiring for the vcc (vdd) and gnd (vss) lines and by installing decoupling capacitors (of approximately 0.01 f to 1 f capacitance) as high-frequency filters between vcc (vdd) and gnd (vss) at strategic locations on the printed circuit board. for low-frequency filtering, it is a good idea to install a 10- to 100- f capacitor on the printed circuit board (one capacitor will suffice). if the capacitance is excessively large, however, (e.g. several thousand f) latch-up can be a problem. be sure to choose an appropriate capacitance value. an important point about wiring is that, in the case of high-speed logic ics, noise is caused mainly by reflection and crosstalk, or by the power supply impedance. reflections cause increased signal delay, ringing, overshoot and undershoot, thereby reducing the device?s safety margins with respect to noise. to prevent reflections, reduce the wiring length by increasing the device mounting density so as to lower the inductance (l) and capacitance (c) in the wiring. extreme care must be taken, however, when taking this corrective measure, since it tends to cause crosstalk between the wires. in practice, there must be a trade-off between these two factors. 3.3.11 external noise printed circuit boards with long i/o or signal pattern lines are vulnerable to induced noise or surges from outside sources. consequently, malfunctions or breakdowns can result from overcurrent or overvoltage, depending on the types of device used. to protect against noise, lower the impedance of the pattern line or insert a noise-canceling circuit. protective measures must also be taken against surges. for details of the appropriate protective measures for a particular device, consult the relevant databook. 3.3.12 electromagnetic interference widespread use of electrical and electronic equipment in recent years has brought with it radio and tv reception problems due to electromagnetic interference. to use the radio spectrum effectively and to maintain radio communications quality, each country has formulated regulations limiting the amount of electromagnetic interference which can be generated by individual products. electromagnetic interference includes conduction noise propagated through power supply and telephone lines, and noise from direct electromagnetic waves radiated by equipment. different measurement methods and corrective measures are used to assess and counteract each specific type of noise. difficulties in controlling electromagnetic interference derive from the fact that there is no method available which allows designers to calculate, at the design stage, the strength of the electromagnetic waves which will emanate from each component in a piece of equipment. for this reason, it is only after the prototype equipment has been completed that the designer can take measurements using a dedicated instrument to determine the strength of electromagnetic interference waves. yet it is possible during system design to incorporate some measures for the input/output signals
3 general safety precautions and usage considerations 3-10 prevention of electromagnetic interference, which can facilitate taking corrective measures once the design has been completed. these include installing shields and noise filters, and increasing the thickness of the power supply wiring patterns on the printed circuit board. one effective method, for example, is to devise several shielding options during design, and then select the most suitable shielding method based on the results of measurements taken after the prototype has been completed. 3.3.13 peripheral circuits in most cases semiconductor devices are used with peripheral circuits and components. the input and output signal voltages and currents in these circuits must be chosen to match the semiconductor device?s specifications. the following factors must be taken into account. (1) inappropriate voltages or currents applied to a device?s input pins may cause it to operate erratically. some devices contain pull-up or pull-down resistors. when designing your system, remember to take the effect of this on the voltage and current levels into account. (2) the output pins on a device have a predetermined external circuit drive capability. if this drive capability is greater than that required, either incorporate a compensating circuit into your design or carefully select suitable components for use in external circuits. 3.3.14 safety standards each country has safety standards which must be observed. these safety standards include requirements for quality assurance systems and design of device insulation. such requirements must be fully taken into account to ensure that your design conforms to the applicable safety standards. 3.3.15 other precautions (1) when designing a system, be sure to incorporate fail-safe and other appropriate measures according to the intended purpose of your system. also, be sure to debug your system under actual board-mounted conditions. (2) if a plastic-package device is placed in a strong electric field, surface leakage may occur due to the charge-up phenomenon, resulting in device malfunction. in such cases take appropriate measures to prevent this problem, for example by protecting the package surface with a conductive shield. (3) with some microcomputers and mos memory devices, caution is required when powering on or resetting the device. to ensure that your design does not violate device specifications, consult the relevant databook for each constituent device. (4) ensure that no conductive material or object (such as a metal pin) can drop onto and short the leads of a device mounted on a printed circuit board. 3.4 inspection, testing and evaluation 3.4.1 grounding ground all measuring instruments, jigs, tools and soldering irons to earth. electrical leakage may cause a device to break down or may result in electric shock.
3 general safety precautions and usage considerations 3-11 3.4.2 inspection sequence c do not insert devices in the wrong orientation. make sure that the positive and negative electrodes of the power supply are correctly connected. otherwise, the rated maximum current or maximum power dissipation may be exceeded and the device may break down or undergo performance degradation, causing it to catch fire or explode, resulting in injury to the user. d when conducting any kind of evaluation, inspection or testing using ac power with a peak voltage of 42.4 v or dc power exceeding 60 v, be sure to connect the electrodes or probes of the testing equipment to the device under test before powering it on. connecting the electrodes or probes of testing equipment to a device while it is powered on may result in electric shock, causing injury. (1) apply voltage to the test jig only after inserting the device securely into it. when applying or removing power, observe the relevant precautions, if any. (2) make sure that the voltage applied to the device is off before removing the device from the test jig. otherwise, the device may undergo performance degradation or be destroyed. (3) make sure that no surge voltages from the measuring equipment are applied to the device. (4) the chips housed in tape carrier packages (tcps) are bare chips and are therefore exposed. during inspection take care not to crack the chip or cause any flaws in it. electrical contact may also cause a chip to become faulty. therefore make sure that nothing comes into electrical contact with the chip. 3.5 mounting there are essentially two main types of semiconductor device package: lead insertion and surface mount. during mounting on printed circuit boards, devices can become contaminated by flux or damaged by thermal stress from the soldering process. with surface-mount devices in particular, the most significant problem is thermal stress from solder reflow, when the entire package is subjected to heat. this section describes a recommended temperature profile for each mounting method, as well as general precautions which you should take when mounting devices on printed circuit boards. note, however, that even for devices with the same package type, the appropriate mounting method varies according to the size of the chip and the size and shape of the lead frame. therefore, please consult the relevant technical datasheet and databook. 3.5.1 lead forming c always wear protective glasses when cutting the leads of a device with clippers or a similar tool. if you do not, small bits of metal flying off the cut ends may damage your eyes. d do not touch the tips of device leads. because some types of device have leads with pointed tips, you may prick your finger. semiconductor devices must undergo a process in which the leads are cut and formed before the devices can be mounted on a printed circuit board. if undue stress is applied to the interior of a device during this process, mechanical breakdown or performance degradation can result. this is attributable primarily to differences between the stress on the device?s external leads and the stress on the internal leads. if the relative difference is great enough, the device?s internal leads, adhesive properties or sealant can be damaged. observe these precautions during the lead- forming process (this does not apply to surface-mount devices):
3 general safety precautions and usage considerations 3-12 (1) lead insertion hole intervals on the printed circuit board should match the lead pitch of the device precisely. (2) if lead insertion hole intervals on the printed circuit board do not precisely match the lead pitch of the device, do not attempt to forcibly insert devices by pressing on them or by pulling on their leads. (3) for the minimum clearance specification between a device and a printed circuit board, refer to the relevant device?s datasheet and databook. if necessary, achieve the required clearance by forming the device?s leads appropriately. do not use the spacers which are used to raise devices above the surface of the printed circuit board during soldering to achieve clearance. these spacers normally continue to expand due to heat, even after the solder has begun to solidify; this applies severe stress to the device. (4) observe the following precautions when forming the leads of a device prior to mounting. ? use a tool or jig to secure the lead at its base (where the lead meets the device package) while bending so as to avoid mechanical stress to the device. also avoid bending or stretching device leads repeatedly. ? be careful not to damage the lead during lead forming. ? follow any other precautions described in the individual datasheets and databooks for each device and package type. 3.5.2 socket mounting (1) when socket mounting devices on a printed circuit board, use sockets which match the inserted device?s package. (2) use sockets whose contacts have the appropriate contact pressure. if the contact pressure is insufficient, the socket may not make a perfect contact when the device is repeatedly inserted and removed; if the pressure is excessively high, the device leads may be bent or damaged when they are inserted into or removed from the socket. (3) when soldering sockets to the printed circuit board, use sockets whose construction prevents flux from penetrating into the contacts or which allows flux to be completely cleaned off. (4) make sure the coating agent applied to the printed circuit board for moisture-proofing purposes does not stick to the socket contacts. (5) if the device leads are severely bent by a socket as it is inserted or removed and you wish to repair the leads so as to continue using the device, make sure that this lead correction is only performed once. do not use devices whose leads have been corrected more than once. (6) if the printed circuit board with the devices mounted on it will be subjected to vibration from external sources, use sockets which have a strong contact pressure so as to prevent the sockets and devices from vibrating relative to one another. 3.5.3 soldering temperature profile the soldering temperature and heating time vary from device to device. therefore, when specifying the mounting conditions, refer to the individual datasheets and databooks for the devices used.
3 general safety precautions and usage considerations 3-13 (1) using a soldering iron complete soldering within ten seconds for lead temperatures of up to 260c, or within three seconds for lead temperatures of up to 350c. (2) using medium infrared ray reflow ? heating top and bottom with long or medium infrared rays is recommended (see figure 3). long infrared ray heater (preheating) medium infrared ray heater (reflow) product flow figure 3 heating top and bottom with long or medium infrared rays ? complete the infrared ray reflow process within 30 seconds at a package surface temperature of between 210c and 240c. ? refer to figure 4 for an example of a good temperature profile for infrared or hot air reflow. 210 30 s or less time (s) 60-120 s (c) 240 160 140 package surface temperature figure 4 sample temperature profile for infrared or hot air reflow (3) using hot air reflow ? complete hot air reflow within 30 seconds at a package surface temperature of between 210c and 240c. ? for an example of a recommended temperature profile, refer to figure 4 above. (4) using solder flow ? apply preheating for 60 to 120 seconds at a temperature of 150c. ? for lead insertion-type packages, complete solder flow within 10 seconds with the temperature at the stopper (or, if there is no stopper, at a location more than 1.5 mm from the body) which does not exceed 260c. ? for surface-mount packages, complete soldering within 5 seconds at a temperature of 250c or
3 general safety precautions and usage considerations 3-14 less in order to prevent thermal stress in the device. ? figure 5 shows an example of a recommended temperature profile for surface-mount packages using solder flow. 5 s or less 60-120 s (c) 250 160 140 package surface temperature time (s) figure 5 sample temperature profile for solder flow 3.5.4 flux cleaning and ultrasonic cleaning (1) when cleaning circuit boards to remove flux, make sure that no residual reactive ions such as na or cl remain. note that organic solvents react with water to generate hydrogen chloride and other corrosive gases which can degrade device performance. (2) washing devices with water will not cause any problems. however, make sure that no reactive ions such as sodium and chlorine are left as a residue. also, be sure to dry devices sufficiently after washing. (3) do not rub device markings with a brush or with your hand during cleaning or while the devices are still wet from the cleaning agent. doing so can rub off the markings. (4) the dip cleaning, shower cleaning and steam cleaning processes all involve the chemical action of a solvent. use only recommended solvents for these cleaning methods. when immersing devices in a solvent or steam bath, make sure that the temperature of the liquid is 50c or below, and that the circuit board is removed from the bath within one minute. (5) ultrasonic cleaning should not be used with hermetically-sealed ceramic packages such as a leadless chip carrier (lcc), pin grid array (pga) or charge-coupled device (ccd), because the bonding wires can become disconnected due to resonance during the cleaning process. even if a device package allows ultrasonic cleaning, limit the duration of ultrasonic cleaning to as short a time as possible, since long hours of ultrasonic cleaning degrade the adhesion between the mold resin and the frame material. the following ultrasonic cleaning conditions are recommended: frequency: 27 khz 29 khz ultrasonic output power: 300 w or less (0.25 w/cm 2 or less) cleaning time: 30 seconds or less suspend the circuit board in the solvent bath during ultrasonic cleaning in such a way that the ultrasonic vibrator does not come into direct contact with the circuit board or the device.
3 general safety precautions and usage considerations 3-15 3.5.5 no cleaning if analog devices or high-speed devices are used without being cleaned, flux residues may cause minute amounts of leakage between pins. similarly, dew condensation, which occurs in environments containing residual chlorine when power to the device is on, may cause between- lead leakage or migration. therefore, toshiba recommends that these devices be cleaned. however, if the flux used contains only a small amount of halogen (0.05w% or less), the devices may be used without cleaning without any problems. 3.5.6 mounting tape carrier packages (tcps) (1) when tape carrier packages (tcps) are mounted, measures must be taken to prevent electrostatic breakdown of the devices. (2) if devices are being picked up from tape, or outer lead bonding (olb) mounting is being carried out, consult the manufacturer of the insertion machine which is being used, in order to establish the optimum mounting conditions in advance and to avoid any possible hazards. (3) the base film, which is made of polyimide, is hard and thin. be careful not to cut or scratch your hands or any objects while handling the tape. (4) when punching tape, try not to scatter broken pieces of tape too much. (5) treat the extra film, reels and spacers left after punching as industrial waste, taking care not to destroy or pollute the environment. (6) chips housed in tape carrier packages (tcps) are bare chips and therefore have their reverse side exposed. to ensure that the chip will not be cracked during mounting, ensure that no mechanical shock is applied to the reverse side of the chip. electrical contact may also cause a chip to fail. therefore, when mounting devices, make sure that nothing comes into electrical contact with the reverse side of the chip. if your design requires connecting the reverse side of the chip to the circuit board, please consult toshiba or a toshiba distributor beforehand. 3.5.7 mounting chips devices delivered in chip form tend to degrade or break under external forces much more easily than plastic-packaged devices. therefore, caution is required when handling this type of device. (1) mount devices in a properly prepared environment so that chip surfaces will not be exposed to polluted ambient air or other polluted substances. (2) when handling chips, be careful not to expose them to static electricity. in particular, measures must be taken to prevent static damage during the mounting of chips. with this in mind, toshiba recommend mounting all peripheral parts first and then mounting chips last (after all other components have been mounted). (3) make sure that pcbs (or any other kind of circuit board) on which chips are being mounted do not have any chemical residues on them (such as the chemicals which were used for etching the pcbs). (4) when mounting chips on a board, use the method of assembly that is most suitable for maintaining the appropriate electrical, thermal and mechanical properties of the semiconductor devices used. * for details of devices in chip form, refer to the relevant device?s individual datasheets.
3 general safety precautions and usage considerations 3-16 3.5.8 circuit board coating when devices are to be used in equipment requiring a high degree of reliability or in extreme environments (where moisture, corrosive gas or dust is present), circuit boards may be coated for protection. however, before doing so, you must carefully consider the possible stress and contamination effects that may result and then choose the coating resin which results in the minimum level of stress to the device. 3.5.9 heat sinks (1) when attaching a heat sink to a device, be careful not to apply excessive force to the device in the process. (2) when attaching a device to a heat sink by fixing it at two or more locations, evenly tighten all the screws in stages (i.e. do not fully tighten one screw while the rest are still only loosely tightened). finally, fully tighten all the screws up to the specified torque. (3) drill holes for screws in the heat sink exactly as specified. smooth the surface by removing burrs and protrusions or indentations which might interfere with the installation of any part of the device. (4) a coating of silicone compound can be applied between the heat sink and the device to improve heat conductivity. be sure to apply the coating thinly and evenly; do not use too much. also, be sure to use a non-volatile compound, as volatile compounds can crack after a time, causing the heat radiation properties of the heat sink to deteriorate. (5) if the device is housed in a plastic package, use caution when selecting the type of silicone compound to be applied between the heat sink and the device. with some types, the base oil separates and penetrates the plastic package, significantly reducing the useful life of the device. two recommended silicone compounds in which base oil separation is not a problem are yg6260 from toshiba silicone. (6) heat-sink-equipped devices can become very hot during operation. do not touch them, or you may sustain a burn. 3.5.10 tightening torque (1) make sure the screws are tightened with fastening torques not exceeding the torque values stipulated in individual datasheets and databooks for the devices used. (2) do not allow a power screwdriver (electrical or air-driven) to touch devices. 3.5.11 repeated device mounting and usage do not remount or re-use devices which fall into the categories listed below; these devices may cause significant problems relating to performance and reliability. (1) devices which have been removed from the board after soldering (2) devices which have been inserted in the wrong orientation or which have had reverse current applied (3) devices which have undergone lead forming more than once
3 general safety precautions and usage considerations 3-17 3.6 protecting devices in the field 3.6.1 temperature semiconductor devices are generally more sensitive to temperature than are other electronic components. the various electrical characteristics of a semiconductor device are dependent on the ambient temperature at which the device is used. it is therefore necessary to understand the temperature characteristics of a device and to incorporate device derating into circuit design. note also that if a device is used above its maximum temperature rating, device deterioration is more rapid and it will reach the end of its usable life sooner than expected. 3.6.2 humidity resin-molded devices are sometimes improperly sealed. when these devices are used for an extended period of time in a high-humidity environment, moisture can penetrate into the device and cause chip degradation or malfunction. furthermore, when devices are mounted on a regular printed circuit board, the impedance between wiring components can decrease under high- humidity conditions. in systems which require a high signal-source impedance, circuit board leakage or leakage between device lead pins can cause malfunctions. the application of a moisture-proof treatment to the device surface should be considered in this case. on the other hand, operation under low-humidity conditions can damage a device due to the occurrence of electrostatic discharge. unless damp-proofing measures have been specifically taken, use devices only in environments with appropriate ambient moisture levels (i.e. within a relative humidity range of 40% to 60%). 3.6.3 corrosive gases corrosive gases can cause chemical reactions in devices, degrading device characteristics. for example, sulphur-bearing corrosive gases emanating from rubber placed near a device (accompanied by condensation under high-humidity conditions) can corrode a device?s leads. the resulting chemical reaction between leads forms foreign particles which can cause electrical leakage. 3.6.4 radioactive and cosmic rays most industrial and consumer semiconductor devices are not designed with protection against radioactive and cosmic rays. devices used in aerospace equipment or in radioactive environments must therefore be shielded. 3.6.5 strong electrical and magnetic fields devices exposed to strong magnetic fields can undergo a polarization phenomenon in their plastic material, or within the chip, which gives rise to abnormal symptoms such as impedance changes or increased leakage current. failures have been reported in lsis mounted near malfunctioning deflection yokes in tv sets. in such cases the device?s installation location must be changed or the device must be shielded against the electrical or magnetic field. shielding against magnetism is especially necessary for devices used in an alternating magnetic field because of the electromotive forces generated in this type of environment.
3 general safety precautions and usage considerations 3-18 3.6.6 interference from light (ultraviolet rays, sunlight, fluorescent lamps and incandescent lamps) light striking a semiconductor device generates electromotive force due to photoelectric effects. in some cases the device can malfunction. this is especially true for devices in which the internal chip is exposed. when designing circuits, make sure that devices are protected against incident light from external sources. this problem is not limited to optical semiconductors and eproms. all types of device can be affected by light. 3.6.7 dust and oil just like corrosive gases, dust and oil can cause chemical reactions in devices, which will adversely affect a device?s electrical characteristics. to avoid this problem, do not use devices in dusty or oily environments. this is especially important for optical devices because dust and oil can affect a device?s optical characteristics as well as its physical integrity and the electrical performance factors mentioned above. 3.6.8 fire semiconductor devices are combustible; they can emit smoke and catch fire if heated sufficiently. when this happens, some devices may generate poisonous gases. devices should therefore never be used in close proximity to an open flame or a heat-generating body, or near flammable or combustible materials. 3.7 disposal of devices and packing materials when discarding unused devices and packing materials, follow all procedures specified by local regulations in order to protect the environment against contamination.
4 precautions and usage considerations 4-1 4. precautions and usage considerations this section describes matters specific to each product group which need to be taken into consideration when using devices. if the same item is described in sections 3 and 4, the description in section 4 takes precedence. 4.1 microcontrollers 4.1.1 design (1) using resonators which are not specifically recommended for use resonators recommended for use with toshiba products in microcontroller oscillator applications are listed in toshiba databooks along with information about oscillation conditions. if you use a resonator not included in this list, please consult toshiba or the resonator manufacturer concerning the suitability of the device for your application. (2) undefined functions in some microcontrollers certain instruction code values do not constitute valid processor instructions. also, it is possible that the values of bits in registers will become undefined. take care in your applications not to use invalid instructions or to let register bit values become undefined.
4 precautions and usage considerations 4-2
tx3916f

chapter 1 the TMPR3916 preliminary 1-1 1. the TMPR3916 1.1 applications and references the TMPR3916 is a family member of toshiba?s 32-bit system risc family. as an application-specific standard product (assp) it is designed for a wide range of applications such as: ? car navigation systems ? driver information displays ? personal digital assistants (pdas) ? musical instruments ? electronic book players the TMPR3916 uses a tx39/h core as its cpu. the tx39/h cpu core is a risc processor developed by toshiba based on the r3000a architecture of mips technologies inc. . in addition to the processor core, this assp includes peripheral circuits such as a graphics display controller, a memory controller, a dma controller, several serial communication interfaces, can-bus interfaces, interval timers and general purpose i/os. please refer to the following document for information about the tx39 core architecture, including the instruction set: 32-bit tx system risc tx39 family architecture (document number 44137d)
chapter 1 the TMPR3916 preliminary 1-2 1.2 features miscellaneous: ? 60 mhz maximum operating frequency: ? 208 pin qfp package (qfp208-p-2828-0.50) ? 3.3 v power supply voltage ? ca. 1200mw maximum power dissipation ? -40c to 85c operating ambient temperature ? built-in clock generator ? 5v tolerant i/os on uarts, txsei and can-bus interface ? unified memory architecture with a high performance dual bus structure (video bus + cpu bus) graphics display controller: ? four-layer (a-d) overlay hardware processing with transparent color: ? layer a, b can display 256 out of 64 k colors each ? layer c, d can display 16 out of 64 k colors each ? alternatively layer a may be configured in picture mode with 64k colors ? sdram and sram frame-buffer memory (sram recommended only for low resolutions) ? burst access to frame-buffer memory ? 16 bytes built-in dot buffer ? built-in color look-up tables (for plane a-d, 544 colors in total) ? built-in three-channel 6-bit video dac, alternatively connection to digital displays (digital rgb output) ? dotclock, horizontal and vertical synchronisation signals can be generated internally or input from external device built-in tx39 core: ? toshiba-developed tx39h core based on mips r3000a architecture ? 4 kb instruction cache, 1 kb data cache ? built-in debug support unit for in-system debugging incl. real time pc-tracing ? big-endian coding peripheral controllers: ? memory controller (memc), 4 channels for sram, rom, flash ? sdram controller (sdramc), 2 channels ? dma controller (dmac), 2 channels ? interrupt controller (intc), 13 internal interrupts, 3 external interrupts, 1 non-maskable interrupt (nmi) ? serial i/o : uart 4 channels, txsei 1 channel (spi compatible, with fifos) ? can-bus controller (txcan), 2 channels, 16 mailboxes each ? 30 pin general purpose i/os (port)
chapter 1 the TMPR3916 preliminary 1-3 1.3 differences between tx3903af and TMPR3916 in catchwords this section explains changed features of TMPR3916 in comparison to its predecessor tx3903af. for detailed information please have a deeper look into this document. ? 60 mhz operating frequency ? added dual can device ? added txsei functionality ? added two channel sdram controller ? separate video- and cpu-bus to sdram in order to increase system performance ? removed edo-dram channels from memc ? no more support of pipelined burst sram ? graphics display controller: increased number of colors from 16 to 256 in layer a and b ? raised number of 16 general purpose ios to 30 and added capability of triggering interrupt ? extended timer functionality to pwm-support ? increased number of internal interrupts ? modified uart incl. register structure ? external bus-master functionality is not supported any more
chapter 1 the TMPR3916 preliminary 1-4 1.4 structure of TMPR3916 and a system example the following picture shows the block diagram of the TMPR3916: clock generator / pll tx39/h core core 4kb i$ 1kb d$ memory controller (mc) dsu sdramc memc gdc viewdac txcan channel 0 channel 1 intc timer pio sei sci channel 0 channel 1 channel 2 channel 3 xtal1,plloff, clken xtal2 sysclk reset pcst[2:0] dclk dsa0/tpc dbge sdi/dint dreset test[2:0] ext[2:0] nmi rxcan0, rxcan1 txcan0, txcan1 rout gout bout hsync vsync/csync hdisp dotclk pio[15:0] / digital rgb pio[29:16] / sci, sei ras cas we cke cs[1:0] dmac channel 0 channel 1 dreq0 dack0 halt cs[5:2] cpu bus video bus rd, wr, last bstart, burst a[26:2] d[31:0] be[3:0] ack, buserr figure 1.4.1 block diagram TMPR3916
chapter 1 the TMPR3916 preliminary 1-5 the following picture shows a system example with TMPR3916: TMPR3916 sdram rom cdrom i/f sram i/o ctrl mc sio sei can gps gyro gdc lc display rgb hsync vsync figure 1.4.2 system example using TMPR3916
chapter 1 the TMPR3916 preliminary 1-6 1.5 address map the following table shows the memory map of TMPR3916. memory area of tx39-cpu physical address memory device special use in TMPR3916 kernel uncached/ cached (kseg0, kseg1) 0x0000 0000 sdram, sram, rom * interrupt vector at 0x0000 0080 0x1c00 0000 internal register devices of TMPR3916 0x1e00 0000 sdram, sram, rom * 0x1fc0 0000 boot rom start address after reset or nmi inaccessible 0x2000 0000 user / kernel cached (kuseg) 0x4000 0000 sdram, sram, rom * user / kernel uncached (kuseg - reserved) 0xbf00 0000 kernel cached (kseg2) 0xc000 0000 kernel uncached (kseg2 - reserved) 0xff00 0000 figure 1.5.1 TMPR3916?s memory map * for sdram, sram or rom shown in the above table, the software can define the address range of the connected memory devices. for further information see chapter "memory controller".
chapter 1 the TMPR3916 preliminary 1-7 the following table shows the address ranges of the internal devices: address range (physical address) address range (virtual address) device 0x1c00_0000 .. 0x1c00_07ff 0xbc00_0000 .. 0xbc00_07ff asynchronous serial interface (uart) 0x1c00_8000 .. 0x1c00_ffff 0xbc00_8000 .. 0xbc00_ffff synchronous serial interface (txsei) 0x1c01_0000 .. 0x1c01_ffff 0xbc01_0000 .. 0xbc01_ffff timer 0x1c02_0000 .. 0x1c02_7fff 0xbc02_0000 .. 0xbc02_7fff memory controller (memc) 0x1c02_8000 .. 0x1c02_ffff 0xbc02_8000 .. 0xbc02_ffff memory controller (sdramc) 0x1c03_0000 .. 0x1c03_ffff 0xbc03_0000 .. 0xbc03_ffff parallel interface (port) 0x1c04_0000 .. 0x1c04_ffff 0xbc04_0000 .. 0xbc04_ffff interrupt controller (intc) 0x1c05_0000 .. 0x1c05_ffff 0xbc05_0000 .. 0xbc05_ffff graphic display controller (gdc) 0x1c06_0000 .. 0x1c06_ffff 0xbc06_0000 .. 0xbc06_ffff direct memory access controller (dmac) 0x1c07_0000 .. 0x1c07_7fff 0xbc07_0000 .. 0xbc07_7fff can module (txcan), channel 0 0x1c07_8000 .. 0x1c07_ffff 0xbc07_8000 .. 0xbc07_ffff can module (txcan), channel 1 0x1c08_0000 .. 0x1c08_ffff 0xbc08_0000 .. 0xbc08_ffff chip configuration register (ccr) figure 1.5.2 physical and virtual addresses for internal devices note: please note that addresses seen on gbus are physical. therefore virtual addresses can only be used in program code and will be translated before being output to the bus.
chapter 1 the TMPR3916 preliminary 1-8 1.6 clocks the TMPR3916 incorporates an eight-times pll clock generator . connect a crystal oscillator with 1/8 the frequency of the processor clock (processor clock = tx39 core input clock frequency). to reduce power dissipation and simplify system design, the TMPR3916 can control the tx39 core operating frequency and the bus operation reference frequency. clock types: ? master clock master clock regulates the TMPR3916 operations. the clock is eight times the frequency of the external crystal oscillator. ? processor clock this clock is used for TMPR3916 processor core operations. it has the same frequency as the master clock. (when using this clock, set reduced frequency indicator rf[1:0] of the core configuration register to 00. the processor clock will not operate if rf is set to any other value.) ? system clock the system clock regulates the TMPR3916 bus operations. it is generated from the processor clock and is of the same frequency and phase. this clock is output to pin sysclk. setting the clken pin to low stops all clocks of the device. the sysclk pin is set to high in this state and power-consumption is reduced to a minimum. the processor can resume its function immediately after the clken pin has been asserted. for further information see chapter ?electrical characteristics?.
chapter 1 the TMPR3916 preliminary 1-9 1.7 resets setting reset* = low resets the TMPR3916. reset* should be held low for at least 10 cycles of system clock (sysclk). because the reset* signal is synchronized with the TMPR3916 internal clock, the reset* signal can be set asynchronously to system clock. at a reset the TMPR3916 will do the following operations: ? pipeline will be stalled, internal states reset. ? the valid and lock bits of the tx39 cache will be cleared. during reset period the output signals have the following states: a[31:2] = undefined d[31:0] = undefined be[3:0]* = ?high? rd*, wr* = ?high? burst* = ?high? last* = ?high? sysclk = continues outputting clock
chapter 1 the TMPR3916 preliminary 1-10 1.8 time-out-error control unit this unit is a kind of watchdog unit for the internal cpu-bus. when a master sends a gbstart signal, the time-out error control unit starts counting cycles. if no reaction has been detected on the bus, an internal acknowledging gack is generated after 1024 cycles so that the bus is free for interaction again. 1.9 operating modes of TMPR3916 in normal mode , the tx39 core and peripheral circuits operate at maximum frequency. halt mode halts the core operations and reduces power dissipation by stopping the clock in the tx39 core. to switch to halt mode, set the halt bit of the configuration register in tx39 core. in halt mode, the tx39 core holds the status of the pipeline processing and stops the core operations. the write buffer does not stop. if data remains in the write buffer when halt mode is selected, write operations continue until the write buffer becomes empty. also sysclk does not stop. the processor is released from halt mode by using the nmi* signal, reset* signal or by any kind of enabled interrupt. the corresponding exception handler is executed after the halt mode has been released. doze mode halts some tx39 core operations and reduces power dissipation. unlike halt mode, only some clocks in the processor core stop, allowing external bus release requests to be received. also the peripheral blocks continue operating normally in doze mode. to switch to doze mode, set the doze bit of the configuration register in tx39 core. standby mode halts the clock generator pll circuit operation and reduces power dissipation. first, set clken pin to low to stop the clock supply. then, set plloff* pin to low to halt the pll circuit operations.
chapter 1 the TMPR3916 preliminary 1-11 1.10 chip configuration register (ccr) the configuration register is used to configure chip functions concerning more than one module. bit 3130292827262524 name ? viewdac sfb bit 2322212019181716 name ? canm candiv bit 151413121110 9 8 name ? seimux ? toe beow bit 76543210 name dma1cc dma0cc bit name function reset value r/w 31:26 ? wired to zero 0r 25 viewdac by using this bit it is possible to power down the viewdac. 1 = enables the viewdac (default) 0 = disables the viewdac 1 r/w 24 sfb sram frame buffer: 0 = display frame is stored in sdram 1 = display frame is stored in sram 0 r/w 23:22 ? wired to zero 00 r 21:20 canm can operation mode 00 = normal mode x1 = internal test mode 10 = 2 internal can on one tx/rx pair, 1 transceiver 00 r/w 19 ? wired to zero 0r 18:16 candiv the candiv bits set the clock divider for the can modules. the following table shows possible settings and the corresponding divider ratios. 000 = invalid setting 001 = system clock divided by 2 010 = system clock divided by 3 (default) 011 = system clock divided by 4 100 = system clock divided by 5 101 = system clock divided by 6 110 = system clock divided by 7 111 = system clock divided by 8 010 r/w 15:13 ? wired to zero 0r 12 seimux determines whether the txsei or the uart use pins pio16 to pio29. 0 = the uart uses pins 1 = the txsei uses pins 1 r/w 11:10 ? wired to zero 0r 9 toe time-out error control the time-out error counter aborts bus transactions with exception after 1024 cycles, if they are not responded to. 0 = no time-out on internal bus 1 = abort not responded access on internal bus 1 r/w
chapter 1 the TMPR3916 preliminary 1-12 bit name function reset value r/w 8 beow bus error on write this bit determines, if a write transaction on internal bus will aborted, when no device responds after 1024 cycles. 0 = no bus-error on time-out at write 1 = generate bus-error on time-out at write 1 r/w 7:4 dma1cc these bits are used to select devices for dma transfers of dma channel 1. 0000 = uart0, transmission 0001 = uart0, reception 0010 = uart1, transmission 0011 = uart1, reception 0100 = uart2, transmission 0101 = uart2, reception 0110 = uart3, transmission 0111 = uart3, reception 1000 = txsei, transmission 1001 = txsei, reception 1010 = external device 1111 = no device selected (reset value) other settings are invalid 1111 r/w 3:0 dma0cc these bits are used to select devices for dma transfers of dma channel 0. the settings are similar to dma1cc. 1111 r/w
chapter 2 memory controller (mc) preliminary 2-1 2. memory controller (mc) this system?s memory controller consists of two modules: the sdram controller (sdramc) and memc for other types of memory. six multi-purpose memory channels can be administrated: while the channels 0 and 1 are assigned to the sdram controller, the memory controller?s channels are numbered from 2 to 5. the sdram controller contains the following features: ? uses memory architecture single-data-rate sdram ? 2 memory channels with 32 bit width, 16 bit width connectivity is not supported for sdram devices ? base address, mask, dram size & organization configurable for each channel (same physical address space on both video and system-busses) ? true dual g-bus connectivity ? read bursts 4, 8, 16, 32 words, ? single read accesses, single write accesses ? different, mixed burst sizes on both busses are possible ? fair memory arbitration, predictable latency ? memory arbitrated on a first come first serve basis ? for the case of a simultaneous transaction request, the prioritized g-bus can be configured ? one word write-back buffer to reduce bus utilization during write operations ? low-power / self-refresh mode supported ? background refresh during memc accesses ? built-in power-up logic ? programmable refresh cycle the memc contains the following features: ? 4 separate channels ? support for rom, mask rom, page mode rom, eprom, eeprom, sram, and flash devices ? support for page-mode ? base address and size programmable per channel ? external acknowledge mode for external asic slave device connectivity ? data bus width of 16-bit/32-bit is selectable by channel ? supports programmable setup and hold time for address, chip enable, write enable signals ? channel 5 supports boot options
chapter 2 memory controller (mc) preliminary 2-2 2.1 structure of memory controller TMPR3916 owns two internal busses, the system bus and the video bus. the system bus can be accessed by the tx39 core and other devices capable of being master on the bus. additionally, the TMPR3916 provides a second, so called video bus. the video bus is used by the gdc in order to read picture data from the sdram frame buffer. the gdc is the only device on that bus and is not able to write data into sdram. it is only possible to write data into the frame buffer via the system bus. due to system performance considerations it is recommended to use sdram memory for frame buffer, though it is also possible to locate the frame buffer in memory devices accessible by the memc. for this purpose the TMPR3916 provides a bridge between system and video bus. in order to activate this bridge the sfb bit in chip configuration register (ccr) needs to be asserted. it has to be assured that the gdc is not accessing sdram mapped memory in this case. in this mode, the system-performance is restricted by the higher utilization of the system bus and the reduced throughput to the frame buffer memory devices. the following figure shows the structure of the memory controller: sdram controller internal system-bus interface to devices connected to the TMPR3916 registered interface memc video to system bus bridge internal video-bus figure 2.1.1 data flow in memory controller
chapter 2 memory controller (mc) preliminary 2-3 2.2 example memory configuration the following figures show examples how to connect different devices to the TMPR3916. it is possible to have a mixture of different kinds of memories because timing & device configurations are programmable for each channel in the mc. keep in mind that additionally a boot device must always be connected to channel 5 of the memory controller! asynchronous sram connected to the TMPR3916 (16 bit data width): cs[x] * a[15:2] wr * rd * be[3] * be[2] * be[1] * be[0] * d[15:0] d[31:16] ce * a we * oe * lb * ub * d[15:0] TMPR3916 async. sram figure 2.2.1 16-bit asynchronous sram connected to TMPR3916
chapter 2 memory controller (mc) preliminary 2-4 two asynchronous srams connected to one channel of the TMPR3916 : cs[x] a wr * rd * be[3] * be[2] * be[1] * be[0] * d[31:16] d[15:0] ce * a we * oe * lb * ub * d[15:0] ce * a we * oe * lb * ub * d[15:0] async. sram async. sram TMPR3916 figure 2.2.2 2 16-bit asynchronous sram connected to one 32-bit memory channel connection of an external slave device with a data width of 16 bit : sysclk cs[x] * a[15:2] bstart * last * burst * wr * ack buserr * be[1:0] * d[15:0] sysclk cs * a bstart * last * burst * rw * ack * buserr * be[1:0] d[15:0] TMPR3916 external slave figure 2.2.3 16-bit external slave device connected to memory channel
chapter 2 memory controller (mc) preliminary 2-5 connection of an external slave device with a data width of 32 bit : sysclk cs[x * ] a[26:2] bstart * last * burst * rd * ack * buserr * be[3:0] * d[31:0] sysclk cs * a bstart * last * burst * rw * ackout * buserrout * be[3:0] * d[31:0] TMPR3916 external slave figure 2.2.4 32-bit external slave device connected to memory channel the following figure shows the connection of a 32 bit width 16mbit sdram device to the TMPR3916. as can be seen on the chip select signal connectivity (cs0) the device is accessed via channel 0 of the sdram controller. sysclk cke cs0 * a[12:2] a[16:15] ras * cas * we * be[3:0] * d[31:0] clk cke cs * a[10:0] ba[1:0] ras * cas * we * dqm dq[31:0] TMPR3916 sdram 16mbit * 32 figure 2.2.5 16 mbit 32 sdram device connected to memory channel
chapter 2 memory controller (mc) preliminary 2-6 2.3 ports of memory controller the sdram controller externally connects up to two channels of sdram memory. each of the two sdram controller channels has its own organization register and can support different device sizes and organization. the timing settings are shared for both channels and must be the same for both channels. refresh is conducted on both channels in parallel. the memory channels share the memory data, address and control busses with the exception of the chip- select signal, which is wired individually for each channel. each channel must be connected with a width of 32 bits. devices with organizations of 4, 8, 16 and 32 bit width can be used as long as the connected devices jointly form a 32 bit channel. the following table summarizes the externally connected memory signals. signal type description sysclk out dram clock a[14:2] out row/column address bus, connect to a at the sdram device a[16:15] out bank address bus, connect to ba at the sdram device ras * out row access strobe signal cas * out column access strobe signal we * out write enable signal cke out clock enable signal for sdram cs * [1:0] out chip select signal, one for each sdram channel cs[0] => channel x cs[1] => channel y d[31:0] in/out data bus, connect to dq at the sdram device be[3:0] out output mask, connect to dqm at the sdram device 2.4 registers the following registers are used for configuration and operation of the TMPR3916 memory channels 2 to 5 via memc. for channels 0 and 1 (sdram) refer to section 2.5.4. device register (short name) physical address (hex) function rccr2 1c02 0008h rom control register channel 2 rccr3 1c02 000ch rom control register channel 3 rccr4 1c02 0010h rom control register channel 4 memc rccr5 1c02 0014h rom control register channel 5 dccr 1c02 8000h sdram configuration register dcba 1c02 8004h sdram base address register dcam 1c02 8008h sdram address mask register sdram dctr 1c02 800ch sdram timing register
chapter 2 memory controller (mc) preliminary 2-7 2.5 sdramc functions 2.5.1 address translation the table below shows the different memory organizations that have been considered during the controller design and that can be used for each of the two memory channels. channel size (for one channel) mapped g-bus address bits toshiba device number organizations (devices banks rows columns bits) 8 mbyte [22:2] tc59s6432 1 4 2 k 256 32 (sdram, 64 mbit) 16 mbyte [23:2] tc59s6416 2 4 4 k 256 16 (sdram, 64 mbit) 32 mbyte [24:2] tc59s6408 tc59sm716 4 4 4 k 512 8 (sdram, 64 mbit) 2 4 4 k 512 16 (sdram, 128 mbit) 64 mbyte [25:2] tc59s6404 tc59sm708 tc59sm816 8 4 4 k 1 k 4 (sdram, 64 mbit) 4 4 4 k 1 k 8 (sdram, 128 mbit) 2 4 8 k 512 16 (sdram, 256 mbit) 128 mbyte [26:2] tc59sm704 tc59sm808 8 4 4 k 2 k 4 (sdram, 128 mbit) 4 4 8 k 1 k 8 (sdram, 256 mbit) 2 4 8 k 1 k 16 (sdram, 512 mbit) 256 mbyte [27:2] tc59sm804 8 4 8 k 2 k 4 (sdram, 256 mbit) 4 4 8 k 2 k 8 (sdram, 512 mbit) therefore, sdramc supports the following memory organizations: banks: 2 or 4 rows: 2 k, 4 k, 8 k columns: 256, 512, 1 k, 2 k the following table shows address translation of the g-bus address for supported memory configurations. organization column size organization row size organization bank size address mapping coladdr address mapping rowaddr address mapping bankaddr 2 k 2 4 gao[9:2] gao[20:10] gao[21] gao[22:21] 4 k 2 4 gao[9:2] gao[21:10] gao[22] gao[23:22] 256 8 k 2 4 gao[9:2] gao[22:10] gao[23] gao[24:23] 2 k 2 4 gao[10:2] gao[21:11] gao[22] gao[23:22] 4 k 2 4 gao[10:2] gao[22:11] gao[23] gao[24:23] 512 8 k 2 4 gao[10:2] gao[23:11] gao[24] gao[25:24] 2 k 2 4 gao[11:2] gao[22:12] gao[23] gao[24:23] 4 k 2 4 gao[11:2] gao[23:12] gao[24] gao[25:24] 1024 8 k 2 4 gao[11:2] gao[24:12] gao[25] gao[26:25] 2 k 2 4 gao[12:2] gao[23:13] gao[24] gao[25:24] 4 k 2 4 gao[12:2] gao[24:13] gao[25] gao[26:25] 2048 8 k 2 4 gao[12:2] gao[25:13] gao[26] gao[27:26] note: gao (g-bus address output) refers to the physical address of the internal system bus.
chapter 2 memory controller (mc) preliminary 2-8 2.5.2 sdram controller function / bank interleaving the sdramc module functions as an advanced dram controller for synchronous dram. the TMPR3916 sdramc is ?advanced? compared to regular sdram controllers in the way that it is capable of handling two different mcu busses at the same time. sdram memory devices are usually organized in 4 different banks. all of these banks contain a high-speed static ram memory buffer, which allows fast sequential access once a dram memory row has been sensed into these buffers. the sensing of the dram memory row and the rewriting of the sensed row are major contributors to the total duration of each memory access. the following picture shows the benefits of the dual-bus structure: single g-bus sdram controller command dq (output) gbusa start gbus a data actv a nop nop read a nop nop pchg a nop nop read b nop nop pchg b actv b nop qa1 qa2 qa3 qb1 qb2 qb3 qb4 qa4 nop nop nop nop command dq (output) gbusa start gbus a data gbus b start gbus b data dual g-bus sdram controller qa2 qa3 qb1 qb2 qb3 qb4 qa4 actv a nop nop read a nop nop pchg a read b pchg b actv b qb1 qb2 qb3 qa4 nop nop nop qa2 qa3 qb1 qb2 qb3 qb4 qa4 nop nop qa1 qb4 qa1 qa1 qa2 qa3 mcu access video/dma access mcu access video/dma access figure 2.5.1 benefits of dual-bus structure a regular sdram memory controller with only one mcu-bus interface will connect both the mcu and the video-controller on one bus. by transferring the bus-ownership both components access the external dram memory. typically, the sdram controller is able to work with only one address at the same time. it will not know the address for the next access before the previous transfer has been completed. a dual g-bus memory controller always knows the state and address of both busses. therefore, it is possible to work with both addresses at the same time. the dual g-bus structure can only be effectively used, if the following condition is met: the two busses should utilize either different banks of the same channel or two different channels.
chapter 2 memory controller (mc) preliminary 2-9 this means for example that the frame-buffer for the video-controller and the program memory accessed by the mcu should be located in different memory banks. if the condition is not met for two consecutive addresses, the controller needs to precharge the bank first and it has to wait for the precharge-to-active-latency before it can start with the access on the second mcu-bus. a memory throughput gain of up to 40 % can be achieved, if software allows the simultaneous utilization of several sdram banks. 2.5.3 self-refresh mode the sdram controller also offers support for the sdram self-refresh-mode. in self-refresh mode, the connected sdram devices maintain data retention without clock-supply and without the requirement of auto refresh cycles. the self-refresh mode significantly lowers the power consumption of the connected memory devices. self-refresh mode is entered with the assertion of the srm bit in the dccr register. the connected sdram channels and the sdram controller need to be enabled during this operation. upon assertion of this flag, sdramc will enter the self-refresh-mode by issuing a self-refresh-entry command. sdramc will remain in self-refresh mode until the deassertion of the srm flag. the sdramc logic guarantees a minimum time of apl latency cycles in self-refresh mode. the srm flag can be cleared in two different ways, by either writing the bit to ?0? or by conducting an access to mapped memory space. after clearing the srm flag, the cke signal is asserted to exit the self-refresh mode. the sdram controller issues nop commands for the number of cycles specified by the arl setting. after this, a regular auto refresh cycle will be conducted to finalize the sequence.
chapter 2 memory controller (mc) preliminary 2-10 2.5.4 configuration registers overview sdramc is configured using a total of four configuration registers. these configuration registers reside in the sdramc configuration area. the configuration registers can be accessed using byte, half- word and word type accesses. following, the two memory channels are numbered x (cs0) and y (cs1). each channel can be set up using its own memory configuration. the registers rsx, csx and bsx are used to set up the configuration for memory channel x. the registers rsy, csy and bsy are used to setup the configuration for memory channel y. control register (dccr) bit 3130292827262524 name bit 2322212019181716 name rsx csx bsx ? accd srm bit 151413121110 9 8 name rsy csy bsy ? bit 76543210 name ? cen prio ? ena pwr bit name function reset value r/w 31:24 ? wired to zero 0r 23:22 rsx row size for channel x the rsx, csx and bsx fields are used to specify the organization of memory channel x. 00 = 2 k 01 = 4 k 10 = 8 k 11 = invalid setting 00 r/w 21:20 csx column size for channel x number of columns 00 = 256 01 = 512 10 = 1 k 11 = 2 k 00 r/w 19 bsx bank size for channel x number of banks 0 = 2 banks 1 = 4 banks 0 r/w 18 ? wired to zero 0r 17 accd acceleration disable disabling dual g-bus accelerations significantly lowers system performance. therefore, this mode is meant to be used as fault mode only. 0 = all accelerations enabled 1 = prevents dual g-bus accelerations 0 r/w
chapter 2 memory controller (mc) preliminary 2-11 bit name function reset value r/w 16 srm self refresh mode this register is used to enter and exit the sdram self-refresh mode. self-refresh mode will automatically be entered, by writing this register to 1. self-refresh mode is exited, by writing srm with a value of 0 or by conducting a read or write access to the sdram mapped memory region. cen or ena may not be deasserted during self-refresh mode. if self-refresh mode is not utilized, initialize srm to 0. 0 r/w 15:14 rsy row size for channel y the rsy, csy and bsy fields are used to specify the organization of memory channel y. 00 = 2 k 01 = 4 k 10 = 8 k 11 = invalid setting 00 r/w 13:12 csy column size for channel y number of columns 00 = 256 01 = 512 10 = 1 k 11 = 2 k 00 r/w 11 bsy bank size for channel y number of banks 0 = 2 banks 1 = 4 banks 0 r/w 10:6 ? wired to zero 0r 5 cen1 memory channel enable channel y 1 = enable address decoding for this channel 0 = disable address decoding for this channel this setting enables and disables the address decoding for the memory channel. a memory channel cannot be accessed, if it is disabled using this bit and g-bus transactions within the channel?s address range will not be answered. 0 r/w 4 cen0 memory channel enable channel x 1 = enable address decoding for this channel 0 = disable address decoding for this channel this setting enables and disables the address decoding for the memory channel. a memory channel cannot be accessed, if it is disabled using this bit and g-bus transactions within the channel?s address range will not be answered. r/w 3 prio g-bus priority setting this bit can be used to prioritize the access of one g-bus. however, this bit has only a minor impact. in the scenario, the memory controller is in idle state when both g-busses simultaneously start a g-bus transaction: 1 = g-bus x will be serviced with priority 0 = g-bus y will be serviced with priority a real prioritization of one g-bus is not efficient in terms of performance, since it is not possible to utilize the dual g-bus structure under these circumstances. additionally, the latency of one g-bus would become unpredictable. 0 r/w 2 ? wired to zero 0r
chapter 2 memory controller (mc) preliminary 2-12 bit name function reset value r/w 1 ena ena ? module enable 1 = enable module 0 = disable module if sdramc is disabled the state-machine of the sdram controller is suspended and the controller will remain in the idle state. this also means that connected sdrams will not be refreshed and that their contents will be lost. the module should never be disabled during its normal operation. it has to be ensured, that no sdram accesses are performed on one of the g-busses when the module is disabled. for example, sdramc should never be disabled in a situation, where read accesses are still performed on the video bus. it is mandatory to disable the gdc before sdramc is being disabled. software should also ensure, that the internal write-buffer has been written to sdram memory. violations to these rules might result in bus hang-ups. 0 r/w 0 pwr pwr ? power-up sequence setting this bit will run the power-up sequence for all connected and enabled memory devices. the power-up sequence is described more closely in the next chapter. this flag can be read to determine the end of the power-up procedure. at the end of the power-up sequence, this bit is automatically cleared by the sdram controller state-machine. 0 r/w base address register (dcba) bit 31 22 21 16 name bax ? bit 15 6 5 0 name bay ? bit name function reset value r/w 31:22 bax base address memory channel x this register is used to define the base address for memory channel x. this address is compared to the upper 10 bits of the physical g-bus address. 0 r/w 21:16 ? wired to zero 0r 15:6 bay base address memory channels y the same as for the memory channel x. 0 r/w 5:0 ? wired to zero 0r
chapter 2 memory controller (mc) preliminary 2-13 address mask register (dcam) bit 31 22 21 16 name amx ? bit 15 6 5 0 name amy ? bit name function reset value r/w 31:22 amx address mask memory channel x this field is used to mask the base address for memory bank x. 1 = bit is taken into account during comparison 0 = bit is don?t care for the comparison the base address mask is used to select the memory part of an appropriate size. it is also possible to mirror dram memory parts or to protect memory parts using this register. 0 r/w 21:16 ? wired to zero 0r 15:6 amy address mask memory channels y the same as for memory channels x. 0 r/w 5:0 ? wired to zero 0r timing register (dctr) bit 31302928272625242322212019181716 name rfc wrl bit 1514131211109876543210 name apl rasl casl pal arl bit name function reset value r/w 31:18 rfc refresh counter reload value this field provides the reload value for the internal refresh counter. the refresh counter is implemented as a 14 bit down counter, which reloads and issues a refresh request, every time a value of 0 is reached. this settings depends on the specified refresh cycle time and number of rows of the connected memory devices: re gister value = rows of number frequency operation time fresh re (example settings at 60 mhz, counter values / settings in hex) time 2 k row 4 k row 8 k row 32 ms 0x03a9 0x01d4 0x00ea 64 ms 0x0752 0x03a9 0x01d4 128 ms 0x0ea4 0x0752 0x03a9 0x1000 r/w
chapter 2 memory controller (mc) preliminary 2-14 bit name function reset value r/w 17:16 wrl write recovery latency this setting defines the minimum number of cycles, from the point where the last word has been written until the ?precharge? command is issued. this setting has to match the write recovery time (t wr ) of the selected sdram. 00 = 1 cycle 01 = 2 cycles 10 = 3 cycles 11 = 4 cycles 11 r/w 15:13 apl active to precharge latency this field and the associated timer is used to ensure the active to precharge latency (t ras ). the register value is used as reload value for an internal down counter. pchg latency 000 ..010 = invalid setting 011 = 3 cycles 100 = 4 cycles 101 = 5 cycles 110 = 6 cycles 111 = 7 cycles 111 r/w 12:10 rasl ras latency this timeframe has to safely match the t rcd time of the selected sdram device. the setting defines the number of cycles between providing the row address and the column address. this setting is used as reload value for a 3 bit down counter. 010 = 2 cycles 011 = 3 cycles 100 = 4 cycles 101 = 5 cycles others = invalid setting 011 r/w 9:7 casl cas latency this setting defines the number of clock cycles from the time that the column address is provided (read, rda / write, wra) until the first data is taken/output from/on the sdram data bus. during the power-up sequence, this value is programmed into the mode register as it is. for the sdram controller this setting is used as a reload value for an internal down counter. cas latencies of less than 2 cycles are not supported! 010 = 2 cycles 011 = 3 cycles others = invalid settings 011 r/w 6:4 pal same bank precharge -> active/refresh latency this setting defines the minimum number of cycles from the point where the bank is precharged until it is reused (activate, refresh). this timeframe is defined by the t rp time of the selected memory device. this time will not be taken, if a different bank or a different memory device is accessed. 010 = 2 cycles 011 = 3 cycles 100 = 4 cycles 101 = 5 cycles 110 = 6 cycles 111 = 7 cycles others = invalid settings 111 r/w
chapter 2 memory controller (mc) preliminary 2-15 bit name function reset value r/w 3:0 arl auto refresh to next command latency this setting defines the number of clocks, which are taken after an auto refresh command has been issued. this setting is used as a reload value for a down counter. the counter will prevent any active sdram commands until it is expired. 0000 = invalid setting 0001 = 3 cycles 0010 = 4 cycles 0011 = 5 cycles ?? 1111 = 17 cycles 111 r/w 2.5.5 software power-up sequence the picture below shows the software flow that is necessary to initialize the module. the sdram memory typically requires to be held in reset or disabled state until the internal circuits have stabilized. software has to ensure that this state is applied for the specified amount of time by not enabling the sdram controller during this timeframe. after the configuration registers have been sequentially configured, a power-up cycle needs to be scheduled by writing a ?1? value to the pwr bit in the dccr register. finally, the sdram controller and the utilized channels needs to be enabled to start the initialization. the pwr bit can be read to determine the end of the power-up sequence. during the power-up procedure, this flag will be read as ?1?. it is cleared, when the power-up procedure completes. software flow of initialization: wait for at least 200 s reset configure control register (dccr) configure timing register (dctr) configure address mapping (dcam) set pwr in dccr enable the module by asserting the ena bit in dccr pwr cleared? dram ready for usage yes no configure address mapping (dcba) figure 2.5.2 sdram power-up software sequence flow chart
chapter 2 memory controller (mc) preliminary 2-16 2.5.6 address mask configuration the following example provides a step by step approach that shows how to configure base-address and address-masks for a memory channel. for the example it is assumed that two 128 mbit sdram devices with 16 bit connectivity are connected to one of the sdram controller channels. to configure the address mask proceed in the following order: 1. select a base-address for the memory area to be mapped. in this example, we choose 0x5000_0000 as the physical base address for the memory area to be mapped. 2. determine how much memory is connected to the memory channel: in this example 2 devices with 16 mbytes each => 32 mbyte 3. determine how many address bits are required to address 33.554.432 bytes log2 (33554432) = 25 this means that 25 address bits are required for the channel therefore, the correct address mask is 0xfe00. in this case, the memory area from 0x5000_0000 to 0x51ff_ffff will be mapped to the sdram channel. the sdram controller will respond only to bus accesses that refer to an address within this area. starting from this setup also mirror areas and protected areas can be generated: example for mirroring: an address mask 0x7e00 will map the same physical memory twice to the addresses: 0x5000_0000 - 0x51ff_ ffff and 0xd000_0000 - 0xd1ff_ ffff example for protection: an address mask 0xff00 will leave the memory area 0x5000_0000 - 0x50ff_ ffff accessible, while the second half 0x5100_0000 - 0x51ff_ ffff is protected. please note that the sdram always refers to physical address space, which might differ from the virtual address space used within a computer program.
chapter 2 memory controller (mc) preliminary 2-17 timing diagrams basic read timing: clk cs* a ba / a[16:15] cke ras* cas* we* dq / d dqm / be cmd row bank a data0 act read column bank a data1 pchg act row bank a bank a rasl setting casl setting apl setting pal setting register settings for this example: rasl = 010 bin, casl = 010 bin, apl = 100 bin, pal = 011 bin figure 2.5.3 sdram read access timing diagram basic write timing: clk cs* a ba / a[16:15] cke ras* cas* we* dq / d dqm / be cmd row bank a data0 act write column bank a pchg act row bank a bank a rasl setting apl setting pal setting register settings for this example: rasl = 010 bin, casl = 010 bin, apl = 100 bin, pal = 011 bin, wrl = 01bin wrl setting figure 2.5.4 sdram write access timing diagram
chapter 2 memory controller (mc) preliminary 2-18 bank interleaved read timing: clk cs* a ba / a[16:15] cke ras* cas* we* dq / d dqm / be cmd row bank a dataa0 act a read a column bank a dataa1 pchg a act b rasl setting casl setting dataa2 dataa3 datab0 datab1 datab2 datab3 read b rasl setting casl setting row bank b column bank b bank a bank b pchg b apl setting apl setting bank a bank b pal seeting ignored due to bank interleaving cycle figure 2.5.5 read access using bank interleaving auto-refresh timing: clk cs* a ba / a[16:15] cke ras* cas* we* dq / d dqm / be cmd pchg row bank a register settings for this example: pal = 011 bin, arl = 0010 bin aref act bank a pal setting arl setting figure 2.5.6 waveform for auto-refresh timing
chapter 2 memory controller (mc) preliminary 2-19 self refresh mode timing: clk cs* a ba/ a[16:15] cke ras* cas* we* dq/d dqm/be cmd pchg srm entry srm exit bank a pal setting aplreg arlreg aref act arlreg setting for this testcase: arl=0001 bin figure 2.5.7 timing diagram for self refresh mode
chapter 2 memory controller (mc) preliminary 2-20 2.6 memc function channel functionality is specified by applying special values to channel control registers. they must be accessed using 32-bit cycles. 2.6.1 channel assignment TMPR3916 contains the total of four multi-purpose memory controller channels. the following chip-select signals are assigned to these channels: chip enable signal assigned to channel cs2 memc channel 2 cs3 memc channel 3 cs4 memc channel 4 cs5 memc channel 5 (boot channel) channel 5 is a special function channel and is used to boot the microprocessor from external devices like sram, rom or flash memories. 2.6.2 channel 5 boot function for the system boot procedure, it can be chosen, whether the system shall be booted from a 16 or 32 bit device. this choice is made by connecting a pull-up or pull-down resistor to the a26/ boot16 pin. the value of this pin is latched once during system startup on the rising edge of the reset signal, when the ebif data bus is tri-stated. value of a26 / boot16 pin on rising edge of reset boot-function 0 channel 5 is 32-bits wide at boot time 1 channel 5 is 16-bits wide at boot time 2.6.3 operational modes we can distinguish two operational modes depending on the types of memory connected to the channels 2 to 5. these two operational modes lead to two different settings: flash/sram setting and page mode rom setting. 2.6.3.1 flash/sram setting the sram and flash memories cannot be accessed in page mode. therefore some parameters in the rccrx (x = 2, 3, 4, 5) control registers assume a particular meaning. the setting of bits rpm is always 00 (?not configured for page mode?). the rpwt is no longer used as a wait state parameter for second and following accesses in burst mode. in non-page mode rpwt and rwt define together the wait time in the access to the flash or sram. the rwt represents the lower significant bits of the wait time parameter, while rpwt represents the most significant bits.
chapter 2 memory controller (mc) preliminary 2-21 when rwt = 0xf and rpwt = 0x3, the ack* pin becomes an input and the data transaction is completed upon assertion of the ack* signal by the accessed memory. 2.6.3.2 page mode rom setting please note the following before setting the registers to drive memories in burst mode. ? normal sub-mode a channel enters this mode when the following conditions exist: rpm = 00 and (rpwt:rwt[3:0])! = 0x3fh. in this mode the ack*/ready pin is an ack* output and the cycle is terminated based on a 6-bit wait counter. the 6-bit wait counter is the concatenation of the rpwt and rwt fields. access time can be programmed to allow for 0 to 62 wait states. (note: (rpwt:rwt[3:0] = 0x3fh indicates external ack* sub-mode.) ? external ack* sub-mode a channel enters this mode when the following conditions exist: rpm =00 and (rpwt:rwt[3:0] = 0x3fh. in this mode the ack*/ready pin is an ack* input and the cycle is terminated by the external device. the ack* input is synchronized before it is fed to the internal state machine. see section ack* input timing for more details. ? page sub-mode a channel enters this mode when the following conditions exist: rpm! = 00. in this mode the ack*/ready pin is an ack* output and the cycle is terminated based on either the rpwt or rwt wait counter. the mode specifically targets page mode roms. during single cycle access, or the first word of a burst access, the 4-bit rwt field determines the access time. the access time can be programmed to allow for 0 to 15 wait states. during subsequent burst cycle accesses, the 2-bit rpwt field determines the access time and can be programmed to allow for 0 to 3 wait states. there are 3 different page mode burst size settings allowed in the rpm field. when the page mode burst size is less than the cpu burst size, the channel will break access such that the 4-bit rwt field is always used on the programmed page mode boundary. in page mode the rwt time must be greater than or equal to the rpwt time or undetermined results may occur. ? 16-bit bus operation in the case of 16-bit mode if a single cycle is run from the g-bus that requires a single byte or half word that is contained within one 16-bit word then only a single 16-bit access is run on the external bus. otherwise two 16-bit accesses are executed externally. in the case of 16- bit mode, if a burst cycle is run from the g-bus, two 16-bit cycles will be run for each of the burst accesses regardless of the fact that the internal byte enable signal is requesting a byte, half word or any other combination of internal byte enable signal that is not a full 32-bit word. in 16-bit mode the maximum channel size is 512 mbytes.
chapter 2 memory controller (mc) preliminary 2-22 ? rsht option the rsht option is entered when the rsht field is non-zero. this option adds the capability of adding setup and hold time between the following signals: setup ? addr to ce, ce to oe, ce to be. hold ? ce to addr, oe to ce, be to ce. typically it is used with slow i/o peripherals. all setup and hold times are the same for a given value and are not individually programmable. rsht mode cannot be used in conjunction with page mode. all other modes can incorporate the rsht mode but are restricted such that burst accesses are not allowed.
chapter 2 memory controller (mc) preliminary 2-23 rom channel control register 2-4 (rccr2-rccr4) bit 31302928272625242322212019181716 name rba rpm rpwt bit 1514131211109876543210 name rwt rcs rbs ? rbc ? rme rsht bit name function reset value r/w 31:20 rba base address designates the physical base address. 0x000 r/w 19:18 rpm page mode, page size designates the page size of channel word burst page mode. 00 = not configured for page mode 01 = 4-word burst page mode 10 = 8-word burst page mode 11 = 16-word burst page mode 00 r/w 17:16 rpwt page mode wait time designates a 2-bit wait state counter in page mode for consecutive burst accesses. 00 = 0 wait cycles 01 = 1 wait cycle 10 = 2 wait cycles 11 = 3 wait cycles designates the upper 2 bits of a 6-bit wait state counter for all other modes except external ack mode. external ack mode is entered when all bits of rpwt and rwt are set to 1. (refer to ?rwt?) 00 r/w 15:12 rwt normal mode wait time designates a 4-bit wait state counter in page mode for single cycles or initial burst cycle. 0000 = 0 wait cycles 0001 = 1 wait cycle 0010 = 2 wait cycles : : 1111 = 15 wait cycles designates the lower 4-bits of a 6-bit wait state counter in all other modes except external ack mode. external ack mode is entered when all bits of rpwt and rwt are set to 1. rpwt [1:0] : rwt [3:0] 000000 = 0 wait cycles 000001 = 1 wait cycle 000010 = 2 wait cycles : : 011110 = 30 wait cycles 011111 = 31 wait cycles : : 111110 = 62 wait cycles 111111: external ack * mode note: when pm=00, if setting rpwt: rwt = 0x3f, the wait number doesn?t become the longest in ack * output mode but the mode becomes ack * input 0000 r/w
chapter 2 memory controller (mc) preliminary 2-24 bit name function reset value r/w 11:8 rcs channel size designates the memory size to be assigned. 0000 = 1 m byte 0110: 64 m bytes 0001 = 2 m bytes 0111: 128 m bytes 0010 = 4 m bytes 1000: 256 m bytes 0011 = 8 m bytes 1001: 512 m bytes 0100 = 16 m bytes 1010: 1 g bytes 0101 = 32 m bytes 1011-1111: reserved in 16-bit mode the maximum channel size allowed is 512m bytes. 0000 r/w 7 rbs bus size sets up the memory bus width of channel 2. 0 = 32-bit bus size 1 = 16-bit bus size 0 r/w 6 ? wired to zero 0r 5 rbc byte enable control this bit determines whether the byte enable signals (be[3:0]) are asserted on read and write accessed or only on write accesses. 0 = byte enables active on read and write accesses 1 = byte enables active only on write accesses 0 r/w 4 ? wired to zero 0r 3 rme master enable enables channel. 0 = channel is disabled 1 = channel is enabled 0 r/w 2:0 rsht setup/hold wait time selects the number of wait states between address and chip enable signal, chip select signal and write enable/output enable signal. 000 = disabled 001 = 1 wait 010 = 2 wait 011 = 3 wait : : 111 = 7 wait burst access and page mode are not allowed if this bit field is non- zero. 000 r/w
chapter 2 memory controller (mc) preliminary 2-25 rom channel control register 5 (rccr5) the channel 5 is used as boot channel. note that the pin a26 / boot16 has an impact on the bus width setting of the connected boot device. the rccr5 has the same bit functions like rccr2 to rccr4. only reset-values differ. for detailed description of function, please see rccr2-rccr4. bit 31302928272625242322212019181716 name rba rpm rpwt bit 1514131211109876543210 name rwt rcs rbs ? rbc ? rme rsht bit name reset configuration reset value r/w 31:20 rba base address (default: 0x1fc0 0000) 0x1fc r/w 19:18 rpm page mode, page size (default: no page mode) 00 r/w 17:16 rpwt the device is not configured for page mode (rpm bits). this means that rpwt and rwt are combined to one counter value for the wait state generation. the wait state counter is set to 64 wait states, that can be reduced in the boot routine to a value that fits to the connected device. 11 r/w 15:12 rwt normal mode wait time (default: 14 wait cycles) 1110 r/w 11:8 rcs channel size (default: 4 mbyte) 0010 r/w 7 rbs bus size (configuration is latched from a26/boot16 pin) boot16 pin r/w 6 ? wired to zero 0r 5 rbc byte control (default: byte enables only active on write access) 0r/w 4 ? wired to zero 0r 3 rme master enable (default: enabled) 1r/w 2:0 rsht setup/hold wait time (default: disabled) 000 r/w
chapter 2 memory controller (mc) preliminary 2-26 2.6.4 timing diagrams single read access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 be 0 data 0 single read with rwt = 01 (1 wait state) rw t wait states data latched figure 2.6.1 sram/rom/flash single read access timing single write access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 be 0 data 0 single w rite with rwt = 01 (1 wait state) rwt wait states figure 2.6.2 sram/rom/flash single write access timing
chapter 2 memory controller (mc) preliminary 2-27 page mode read access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 0000 data 0 data 1 data 2 data 3 address 1 address 2 address 3 4-word page-mode with rwt = 01 (1 wait state) and rpwt = 0001 (1 wait state) rwt wait states rpwt wait states rpwt wait states rpwt wait states data latched data latched data latched data latched figure 2.6.3 timing diagram for sram/rom/flash read access using page mode external acknowledge mode read access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 be 0 data 0 data latched figure 2.6.4 waveform for external acknowledge mode read access timing
chapter 2 memory controller (mc) preliminary 2-28 external acknowledge mode write access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 be 0 data 0 figure 2.6.5 waveform for external acknowledge mode write access timing external acknowledge mode bus error: sysclk csx a be rd wr bstart last burst d ack buserr address 0 be 0 data 0 data latched figure 2.6.6 bus error during external acknowledge mode timing
chapter 2 memory controller (mc) preliminary 2-29 16 bit read access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 1100 data 0 data 2 address 1 data latched data latched 1111 1100 figure 2.6.7 sdram timing diagram for 16-bit read access 16 bit write access: sysclk csx a be rd wr bstart last burst d ack buserr address 0 1100 data 0 data 2 address 1 1111 1100 figure 2.6.8 sdram timing diagram for 16-bit write access
chapter 2 memory controller (mc) preliminary 2-30
chapter 3 graphics display controller (gdc) preliminary 3-1 3. graphics display controller (gdc) the graphics display controller contains the following characteristics: ? supports sdram and sram frame buffer burst mode for reading on sdram ? supports four-layer overlay display function using hardware processing layer a/e: map mode (256 colors) ? referred to as layer a, picture mode (65,536 colors) ? referred to as layer e layer b: map mode (one of the 256 colors is transparent) layer c: map mode (one of the 16 colors is transparent) layer d: map mode (one of the 16 colors is transparent) displaying layers a and e together is not possible. layer d screen size can be set independently of the other layer sizes. incorporates a 544 entries color palette (256 colors two layers and 16 colors two layers). ? display control: non-interlaced scanning smooth scrolling (vertical and horizontal) for layers a, b, c and d generates and outputs synchronization signals (hsync, vsync / csync), also supports control by external synchronization signal input. both digital and analog rgb signal output ? dot clock: supports internal and external dot clock
chapter 3 graphics display controller (gdc) preliminary 3-2 3.1 gdc structure 3.1.1 display screen the TMPR3916 can display four layers, overlaid in the following order: a/e, b, c and d. top layer is d (see figure 3.1.1). displaying layers a and e together is not possible because these layers use the same resources except for color palette and dot buffer. the blank signal blk enables the display data output. the layer active signals la, lb, lc and ld activate each layer. layer d screen size can be set independently of the other layer sizes. layer a can be switched between map mode and picture mode (then called layer e). use the lpa bit of the display control register (dcr) to switch the modes. layer a/e layer b layer c layer d la, lpa data a/e: layer a/e displayed lb data b: (0), 1 layer b displayed lc data c: (0), 1 layer c displayed ld data d: (0), 1 layer d displayed next layer displayed next layer displayed next layer displayed lx data x = 1 : display lx data x = 0 : no display (transparent) lx : bit in display control register data x : layer x display data x : a/e, b, c, d figure 3.1.1 layer arrangement as can be seen in the figure above layer a/e will always be displayed if all other activated layers contain transparent dots at the current location. therefore it is recommended to always use one of these two layers to prevent the system from reading dots in an undefined background. for display dimensions the following restrictions apply: layers a/e, b and c shall be configured at least 64 dots wide horizontally, layer d should have 16 dots minimum. in vertical direction no restriction exists.
chapter 3 graphics display controller (gdc) preliminary 3-3 3.1.2 frame buffer the TMPR3916 supports sdram and sram as frame buffer. the gdc uses separated address generators for each of its four layers a/e, b, c, and d. it can specify the a/e, b, c, or d layer display data address area by writing the data to the start address register (sarx, where x stands for: a/e, b, c, d), the memory width register (mwrx), the horizontal display start register (hdsr) and the horizontal display end register (hder). the hdsr and hder are stored as one value in the horizontal display start end register (hdser). hder - hdsr sarx sarx + mwrx mwrx frame buffer 1 st line sarx 32 bit frame buffer sarx + mwrx sarx + n ? mw rx (n+1) th line 2 nd line figure 3.1.2 frame buffer data the sarx stores the address of the upper-left corner?s dot belonging to layer x. the mwrx stores the offset value to be added to the contents of sarx to get the address of the left-most pixel of the following line. it is not allowed to store the last dot of one line and the first dot of the next line within one memory word as shown below. the TMPR3916 dot data structure in the frame buffer is as follows: in map mode these values are addresses for color palette. in picture mode these values represent the displayed colors. data length per dot active level # colors map mode c/d 4 bits layers c, d 16 map mode a/b 8 bits layers a, b 256 picture mode 16 bits layer e 64k accordingly, the data structure for each word is as follows. bits 31:28 27:24 23:20 19:16 15:12 11: 8 7:4 3:0 map mode c/d dot 1 dot 2 dot 3 dot 4 dot 5 dot 6 dot 7 dot 8 map mode a/b dot 1 dot 2 dot 3 dot 4 picture mode dot 1 dot 2
chapter 3 graphics display controller (gdc) preliminary 3-4 the minimum value to be stored in mwrx is equal to the number of dots per line in the frame buffer divided by 4 (in case of layers a and b, 8 for c and d and 2 for layer e) and rounded to the next greater integer value (mwrx stores numbers of 32 bit words). in practice, it is advisable to have a certain space between two adjacent lines. therefore the practical memory size is larger than the one requested to cover just one layer. the frame buffer contents represent the address of the color palette which contains the displayed colors for the respective layer: 32 bit frame buffer line 1 dot 1 line 1 dot 2 line 1 dot 3 line 1 dot 4 line 1 dot n-1 line 1 dot n-2 line n dot 1 line n dot 2 line n dot 3 line n dot 4 line n dot n-2 line n dot n-1 16 bit-wide colour palette to digitalout or viewdac line 1 dot n line n dot n figure 3.1.3 frame buffer and color palette in case of layers a or b in case of layers c and d, the contents of register mwrx must be adjusted taking into consideration that there are 8 dots in a 32 bit word. therefore the minimum value is given by the number of dots in a line divided by 8. 32 bit frame buffer line 1 dot 1 line 1 dot 2 line 1 dot 3 line 1 dot 4 line 1 dot n-1 line 1 dot n-2 line n dot 1 line n dot 2 line n dot 3 line n dot 4 line n dot n-2 line n dot n-1 16 bit colour palette to digitalout or viewdac line 1 dot 5 line 1 dot 6 line 1 dot 7 line 1 dot 8 line 1 dot n line n dot 5 line n dot 6 line n dot 7 line n dot 8 line n dot n figure 3.1.4 frame buffer and color palette in case of layers c or d in case of layer e, each 32 bit word is storing the data of 2 dots. so the minimum number to store in mwra (e layer uses a layer registers) is equal to the number of dots in a line divided by 2. no color palette is needed for layer e.
chapter 3 graphics display controller (gdc) preliminary 3-5 32 bit frame buffer line 1 dot 1 line 1 dot 2 line n dot 1 line n dot 2 to digitalout or viewdac line 1 dot n line n dot n figure 3.1.5 frame buffer in case of layer e the number in mwrx is always rounded to the higher integer. some display devices do colour calibrations during synchronization periods. that is why the graphics display controller outputs black level as analog output from viewdac while hdisp=0. for digital output this value is stored in register pa (see port module) with respect to the output mode (dot or pixel). as a result the pa register has to be initialized with the correct value (reset value: 0x00h).
chapter 3 graphics display controller (gdc) preliminary 3-6 3.1.3 display control signal the gdc block generates and outputs the synchronization signal (hsync, vsync, and csync). the display uses non-interlaced scanning. hswr hdsr + 8 hdsr + 9 hder + 8 hcr hsync * hder + 8 vdsr + 1 vder vswr vsync * vdsrr vder vcr blanking area dot data display area figure 3.1.6 display timing the gdc block can select and output a separated synchronization (hsync*, vsync*) or a composite synchronization (csync*) signal. the composite csync* is the ex-nor (exclusive nor) signal of hsync* and vsync*. vsync * hsync * csync * figure 3.1.7 csync * timing in positive mode the composite csync is the ex-or (exclusive or) signal of hsync and vsync. hsync v sync csync figure 3.1.8 csync timing when hsync and vsync are in positive mode the dcr bit csel enables composite synchronization signal output. the bit nsync enables using synchronization signals in positive mode. externally separated synchronization signals can also be used for input. set using the esync bit of the dcr.
chapter 3 graphics display controller (gdc) preliminary 3-7 note that the use of external synchronization signals needs processing time. therefore the input signals hsync and vsync are delayed internally. to compensate this delay, set the horizontal display-related registers -3, the vertical display-related registers need not be changed. for positive mode set the horizontal display-related register ?6 and the vertical display-related register -2. when using external hsync and vsync signals, the horizontal synchronization pulse width (hswr), vertical synchronization pulse width (vswr), horizontal cycle register (hcr) and vertical cycle register (vcr) settings are invalid. external composite synchronization signals cannot be processed by the TMPR3916. please note also that due to internal data structures hds and hde are automatically incremented by 8 so that the effective values are hds+8 and hde+8. 3.1.4 dots and pixels the gdc is able to support both, dot and pixel on digital output. the 16-bit data for one dot is divided into r (red), g (green), and b (blue). a pixel represents one of these colors in a 6-bit value. in consequence one dot represents three pixels as shown in the following figure: 15 11 ~10 6 ~ 50 ~ 0/1 r[5:0] g[5:0] b[5:0] 16-bit dot data 6-bit pixel data 0/1 figure 3.1.9 partitioning rgb data into dot and pixel data each six bits of rgb data are input to the 6-bit dac (three channels) in the gdc. the lsb of r and g transmitted to the dac data are always fixed to zero. in dot mode (dcr[3] = 0) the gdc supports dots on the digital rgb port (pio[15:0]) and dot clock on the dotclk port. in pixel mode (dcr[3] = 1) the gdc supports pixels on the lower 6 ports of the digital rgb port (pio[5:0]) and pixel clock on the dotclk port. within the pixel mode the lsb of r and g are equal to bit 4 of the dcr register (dcr[4]).
chapter 3 graphics display controller (gdc) preliminary 3-8 3.1.4.1 dot clock the dot clock is the reference clock for graphics data output. it is also used to determine the screen size, for example, of each layer. use the following formula to select the dot clock: s) ( period display horizontal dots) visible non (including line per dots display of number = (mhz) speed clock dot note that the internal circuit imposes the following restriction: dot clock speed (mhz) < ? sysclk. the dot clock can be provided internally as a derivative of the system clock. the divisor is defined by dckps (see display control register (dcr)) and can be set to 4, 6, 8, ?, 24. therefore frequencies of 2.5 mhz up to 15 mhz can be reached when using the internal dot clock. default setting for dckps is 0x4h for a dot clock of 6 mhz. alternatively the dot clock may be input via the dotclk pin. 3.1.5 color palette in map mode, each dot can be set for 16 colors using layer c or d and 256 colors using layer a or b. by using the color palette, any 16 or 256 colors respectively can be selected from among the 65,536 colors. the color palette can be set independently for each layer (a, b, c or d). one of the defined colors is transparent for layers b, c and d. it must not be used if no background layer is activated. in picture mode (layer e), the TMPR3916 can display up to 65,536 colors. the dot data are directly defined at the frame buffer and therefore no color palette is necessary. when programming values to clut entries the upper 16 bits of the bus represent the color value, the lower 16 data bits are ignored. example: for programming entry #7 in layer a?s color look-up table to a color with a red part of r = 20, a green pixel g = 23 and a blue one of b = 48, load 0xa5f00000 into memory location 0x1c05081c. the following table shows the color palette structure: layer palette name number of colors color palette no. address color specification a cplta 256 colors 0 1 : 255 1c05 0800 1c05 0804 : 1c05 0bfc free defined color 0 free defined color 1 : free defined color 255 b cpltb 255 colors 0 1 : 255 1c05 0c00 1c05 0c04 : 1c05 0ffc transparent free defined color 0 : free defined color 254 c cpltc 15 colors 0 1 : 15 1c05 0180 1c05 0184 : 1c05 01bc transparent free defined color 0 : free defined color 14 d cpltd 15 colors 0 1 : 15 1c05 01c0 1c05 01c4 : 1c05 01fc transparent free defined color 0 : free defined color 14
chapter 3 graphics display controller (gdc) preliminary 3-9 3.2 scrolling there are two different ways of scrolling when using the TMPR3916?s graphics display controller: smooth scrolling and some kind of register scrolling . smooth scrolling is done by changing the start address of graphics data in memory (sarx). the layers in TMPR3916 have different resolutions in colour depth. that is why the number of dots per word changes from layer to layer. therefore the address of the next dot for display differs. this implies different handling of smooth scrolling in the different kinds of layers. the easiest implementation can be reached using layers c and d. it is also the type of implementation this document starts with. following is the description for layers a and b. register scrolling is another special type of scrolling a layer by changing the values for horizontal and vertical display start and end. as layers a, b, c and e have common settings for display size and are normally fixed to the display?s maximum settings, this scrolling type only applies to layer d. the related registers are hdserd, vdsrd and vderd. the algorithms following are based on c syntax for documentation. they also imply just one step at a time in one direction. for moving in several directions at the same step the related algorithm has to be executed for each direction. for example, if scrolling to the left and up is wanted, two runs of the algorithm are needed ? one for ?left?, one for ?up?. it is assumed that only four directions have been defined: left, right, up and down. this is why the ?up? decision automatically branches into ?down? case if false. 3.2.1 smooth scrolling 3.2.1.1 scrolling layers c and d for smooth scrolling three bits are reserved in start address register (sarx). as layer c and d both consist of data with eight dots per word and this is the maximum amount of differing addresses that can be generated using three bits for coding, no problem occurs for these layers: just add (subtract) to (from) sarx the amount of dots you want to use as offset for smooth scrolling to the left (right) or respectively up (down). the related algorithm is shown in the following diagram: newsarx = sard newsarx = sarc mwrx = mwrc >> 15 mwrx = mwrd >> 15 left true false right true false up true false newsarx += offset newsarx -= offset newsarx += mwr * offset * 4 newsarx -= mwr * offset * 4 sard = newsarx sarc = newsarx layer_c true false layer_c true false example: for scrolling a picture located at 0x50010024 (sarx: 0xa0020048) to the left by one dot simply add 0x01 to the latter value: 0xa0020049 is the correct start address register value for the next picture (physical: 0x50010024). note that the least significant bits in this start adress register
chapter 3 graphics display controller (gdc) preliminary 3-10 are not related to the address counter part (ac) but to this smooth scrolling feature. this leads to a dot offset of 1 in the ss register part, so that the dot read as next is located at 0x50010025. 3.2.1.2 scrolling layers a and b for working on layers a and b the application of smooth scrolling becomes a little more difficult: one word contains data of four dots, of which the number can be coded by using just two of the three bits reserved in sarx. the algorithm shown in the following diagram is to be used: newsarx = sarb newsarx = sara mwrx = mwra >> 15 mwrx = mwrb >> 15 layer_a true false left true false newsarx = (newsarx & 0xfffffff8) | (presarx & 0x00000003) right true false up true false presarx += offset presarx -= offset presarx += mwr * offset * 4 presarx -= mwr * offset * 4 presarx[2] != newsarx[2] true false presarx[2] != newsarx[2] true false newsarx += 8 newsarx -= 8 sarb = newsarx sara = newsarx layer_a true false presarx = newsarx & 0x00000007 newsarx += mwr * offset * 4 newsarx -= mwr * offset * 4 example: for scrolling a picture located at 0x50010024 (sarx: 0xa0020048) to the right by four dots do the following: 1. newsarx = 0xa0020048 2. mwrx = 0x-------- (not needed for this example) 3. presarx = 0x00000000 4. presarx = 0xfffffffc 5. newsarx = 0xa0020044 6. newsarx = 0xa0020044 7. sara = 0xa0020044 this new entry for start address register results in a physical bus address of 0x50010020, which is the memory address located before the one read first in the last step. the smooth scrolling bits show an offset of 0 so in the end the first dot read is located at 0x50010020, too. please be aware of the relationship of adding or subtracting the extra offset 0x08 to the scrolling direction. 3.2.2 register scrolling this scrolling type is implemented easily: just change the values of the start and end registers in horizontal and vertical direction using the projected dot offset:
chapter 3 graphics display controller (gdc) preliminary 3-11 hdserd = hdserd + ((horoffset << 16) + horoffset) vdsrd = vdsrd + (vertoffset << 16) vderd = vderd + (vertoffset << 16) note: for register scrolling the offset handling is kind of reversed in comparison to smooth scrolling. for scrolling a layer to the right the coordinate of the first visible dot has to be incremented. for scrolling a picture in a layer to the right the start address has to be decremented. example: start values: ? horizontal start: dot 34 ? horizontal end: dot 50 ? vertical start: dot 42 ? vertical end: dot 58 for moving layer d up by 2 lines and right by 3 dots the following calculation applies: hdserd = 0x00220032 + 0x00030003 = 0x00250035 vdsrd = 0x002a0000 ? 0x00020000 = 0x00280000 vderd = 0x003a0000 ? 0x00020000 = 0x00380000
chapter 3 graphics display controller (gdc) preliminary 3-12 3.3 internal blockdiagram display control register horizontal transfer number register * 2 a & b & c & d memory width register * 4 a & b & c & d start address register * 4 a & b & c & d horizontal display start register * 2 horizontal display end register * 2 vertical display start register * 2 vertical display end register * 2 horizontal synchronous pulse width register horizontal cycle register vertical synchronous pulse width register vertical cycle register timing control dot shifter dot buffer a, b c, d color palette dot buffer e overlay hsync vsync/ csync hdisp d[31:0] a[31:2] be[3:0] * gdcint * dac analog out rout analog out gout analog out bout digital rgb via pio: [15:0] in dot mode [5:0] in pixel mode 32 16 16 dotclk figure 3.3.1 gdc block diagram
chapter 3 graphics display controller (gdc) preliminary 3-13 3.4 registers overview short name address name function dcr 1c050000 display control register sets the gdc operations. sara/e 1c050010 layer a/e?s start address register specifies the start address of layer a/e on the frame buffer. sarb 1c050014 layer b?s start address register specifies the start address of layer b on the frame buffer. sarc 1c050018 layer c?s start address register specifies the start address of layer c on the frame buffer. sard 1c05001c layer d?s start address register specifies the start address of layer d on the frame buffer. mwra/e 1c050020 layer a/e?s memory width register specifies the line width of layer a/e on the frame buffer. mwrb 1c050024 layer b?s memory width register specifies the line width of layer b on the frame buffer. mwrc 1c050028 layer c?s memory width register specifies the line width of layer c on the frame buffer. mwrd 1c05002c layer d?s memory width register specifies the line width of layer d on the frame buffer. htn 1c050030 layer a/e, b, c?s horizontal transfer number register sets the number of display dots for one line divided by 32. for layers a/e, b, and c. htnd 1c050034 layer d?s horizontal transfer number register sets the number of display dots for one line divided by 32. for layer d. hdser 1c050038 layer a/e, b, c?s horizontal display start / end register sets the layer?s display position and the number of display dots for layers a/e, b, and c. hdserd 1c05003c layer d?s horizontal display start / end register sets the horizontal display position and the number of display dots for layer d. hcr 1c050040 horizontal cycle register specifies the total number of dots within a horizontal cycle. hswr 1c050044 horizontal synchronization pulse width register specifies the horizontal sync signal pulse width using the number of dot clocks. vcr 1c050048 vertical cycle register specifies the total number of lines within a vertical cycle. vswr 1c05004c vertical synchronization pulse width register specifies the vertical sync signal pulse width using the number of lines. vdsr 1c050050 layer a/e, b, c?s vertical display start register sets the vertical display start position for layers a/e, b, and c. vdsrd 1c050054 layer d?s vertical display start register sets the vertical display start position for layer d. vder 1c050058 layer a/e, b, c?s vertical display end register sets the vertical display end position for layers a/e, b, and c. the difference vder ? vdsr defines the number of display dots for layers a/e, b, and c. vderd 1c05005c layer d?s vertical display end register sets the vertical display end position for layer d. the different vderd ? vdsrd defines the number of display dots for layer d.
chapter 3 graphics display controller (gdc) preliminary 3-14 display control register (dcr) bit 3130292827262524 name blk dck ads lpa ld lc lb la bit 2322212019181716 name dckps hv buserr vsync hsync bit 151413121110 9 8 name ? bit 76543210 name ? lsb mode nsync csel esync bit name function reset value r/w 31 blk 0 blank screen (analog output) 1 display frame buffer note: in order to blank the digital outputs the port module has to be set to drive the corresponding pios. this can be achieved by setting the lower bits of the pamux register to logic zero. the data values specified in the corresponding bits of the pa register are output to the pios. 0 r/w 30 dck 0 selects external dot clock 1 selects internal dot clock (divides sysclk) 0 r/w 29 ? wired to zero. 0r 28 lpa 0 map mode (layer a, 8 bits per dot) 1 picture mode (layer e, 16 bits per dot) 0 r/w 27 ld 0 do not display layer d 1 displays layer d 0 r/w 26 lc 0 do not display layer c 1 displays layer c 0 r/w 25 lb 0 do not display layer b 1 displays layer b 0 r/w 24 la 0 do not display layer a/e 1 displays layer a/e 0 r/w 23:20 dckps dot clock: 0 hex not allowed 1 hex 1/4 system frequency 2 hex 1/6 system frequency 3 hex 1/8 system frequency 4 hex 1/10 system frequency 5 hex 1/12 system frequency 6 hex 1/14 system frequency 7 hex 1/16 system frequency 8 hex 1/18 system frequency 9 hex 1/20 system frequency a hex 1/22 system frequency b hex 1/24 system frequency others 1/10 system frequency these bits are relevant only when dck = 1. 0x4 r/w 19 hv 0 interrupt at vsync * 1 interrupt at hsync * 0 r/w 18 buserr 0 no bus error occurred since last write access to dcr 1 bus error on video bus during gdc display data transfer when a bus error occurs on video bus this bit is set to 1. it can only be reset by a write access to dcr (any value for buserr bit). 0 r/w
chapter 3 graphics display controller (gdc) preliminary 3-15 bit name function reset value r/w 17 vsync 0 vertical scanning synchronization pulse period 1 vertical scanning display period note: in positive mode the synchronization period takes place when vsync equals logic 1. 0 r 16 hsync 0 horizontal scanning synchronization pulse period 1 horizontal scanning display period note: in positive mode the synchronization period takes place when hsync equals logic 1. 0 r 15:5 ? wired to zero. 0r 4 lsb 0 outputs 0 on lsb of r/g in pixel mode 1 outputs 1 on lsb of r/g in pixel mode 0 r/w 3 mode 0 dot mode: outputs dots and dot clock 1 pixel mode: outputs pixels serially and pixel clock 0 r/w 2 nsync 0 normal mode: outputs sync signals low active 1 positive mode: outputs sync signals high active 0 r/w 1 csel 0 outputs vsync signal from vsync pin 1 outputs csync signal from vsync pin 0 r/w 0 esync 0 sets hsync and vsync pins to output mode 1 sets hsync and vsync pins to input mode 1 r/w note: when outputting a digital rgb signal, you must set bits [15:0] of pamux register in module port to 1. start address register a/e, b, c, d (sara/e, sarb, sarc, sard) bit 31 2120 3210 name sa ac ss bit name function reset value r/w 31:21 sa segment address these bits specify the segment start address of each layer?s frame buffer. 0 r/w 20:3 ac address counter these bits specify the start address within the segment defined by sa of each layer?s frame buffer. 0 r/w 2:0 ss dot position these bits specify the first visible dot within the first word addressed by ac. note that ss width differs for layer a/b and c/d and does not matter for layer e. the ss[2] bit is not relevant for layers a and b. display start position layer c/d layer a/b 000 from dot 1 from dot 1 001 from dot 2 from dot 2 010 from dot 3 from dot 3 011 from dot 4 from dot 4 100 from dot 5 from dot 1 101 from dot 6 from dot 2 110 from dot 7 from dot 3 111 from dot 8 from dot 4 ac & ss specify the display start position for each layer in units of dots. counting up ac & ss scrolls screen to the left. counting down ac & ss scrolls screen to the right. 0 r/w
chapter 3 graphics display controller (gdc) preliminary 3-16 the specified start address sarx is not the same address as the address on the video bus. the lowest bits (ss bits) are used internally only (!). the differences are described in figure 12: 0 sa[10:0] ac[17:0] ss[2:0] sa[10:0] ac[17:0] 31 2 sarx [31:0] video bus address [31:2] used within gdc only 30 20 19 21 20 3 2 0 31 logical address physical address figure 3.4.1 logical address and physical bus address note: bit 31 of video bus address is tied to 0. memory width register a/e, b, c, d (mwra/e, mwrb, mwrc, mwrd) bit 31 2625 1615 0 name ? mw ? bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 mw specifies the line widths of each layer on the frame buffer in one- word units. for example, where the line width is 320 dots: mw = 28 hex for layer c and d mw = 50 hex for layer a and b mw = a0 hex for layer e 0 r/w 15:0 ? wired to zero 0r horizontal transfer number register (htn) for layers a/e, b and c bit 31 21 20 16 15 0 name ? htn ? bit name function reset value r/w 31:21 ? wired to zero 0r 20:16 htn line size of layer a/e, b and c these specify the number of data transfers for one line. sets the number of display dots for one line divided by 32. 0 r/w 15:0 ? wired to zero 0r note: htn is always rounded to the higher integer value.
chapter 3 graphics display controller (gdc) preliminary 3-17 horizontal transfer number register (htnd) for layer d bit 31 21 20 16 15 0 name ? htnd ? bit name function reset value r/w 31:21 ? wired to zero 0r 20:16 htnd line size of layer d these specify the number of data transfers for one line. sets the number of display dots for one line divided by 32. 0 r/w 15:0 ? wired to zero 0r note: htnd is always rounded to the higher integer value. it is for layer d only as layer d may have a different size. horizontal display start/ end register (hdser) for layers a/e, b and c bit 31 2423 1615 10 9 0 name ? hds ? hde bit name function reset value r/w 31:24 ? wired to zero 0r 23:16 hds these specify the horizontal display start position using the number of dot clocks, starting from the hsync * signal falling edge. 0x2d r/w 15:10 ? wired to zero 0r 9:0 hde these specify the horizontal display end position using the number of dot clocks, starting from the hsync * signal falling edge. number of dots displayed during one period = hde ? hds 0x15d r/w note: the lowest value allowed for hds and hde is 2 hex . due to internal data structures effective values are hds+9 and hde+8. horizontal display start/ end register (hdserd) for layer d bit 31 2423 1615 10 9 0 name ? hdsd ? hded bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 hdsd these specify the horizontal display start position using the number of dot clocks, starting from the hsync * signal falling edge. 0x2d r/w 15:10 ? wired to zero 0r 9:0 hded these specify the horizontal display end position using the number of dot clocks, starting from the hsync * signal falling edge. number of dots displayed during one period = hded - hdsd 0x15d r/w note: the lowest value allowed for hdsd and hded is 2 hex . due to internal data structures effective values are hds+9 and hde+8.
chapter 3 graphics display controller (gdc) preliminary 3-18 horizontal cycle register (hcr) bit 31 2625 1615 0 name ? hc ? bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 hc specifies the total number of dots and dot clocks within one horizontal cycle. hc = horizontal cycle time (s) dot clock frequency (mhz) 0x189 r/w 15:0 ? wired to zero 0r vertical cycle register (vcr) bit 31 2625 1615 0 name ? vc ? bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 vc specifies total number of lines within one vertical cycle. vc = vertical cycle time (ms) / horizontal cycle time (ms) 0x107 r/w 15:0 ? wired to zero 0r horizontal synchronous pulse width register (hswr) bit 31 2322 1615 0 name ? hsw ? bit name function reset value r/w 31:23 ? wired to zero 0r 22:16 hsw specifies the horizontal sync signal pulse width using the number of dot clocks. 0x11 r/w 15:0 ? wired to zero 0r
chapter 3 graphics display controller (gdc) preliminary 3-19 vertical synchronous pulse width register (vswr) bit 31 2120 1615 0 name ? vsw ? bit name function reset value r/w 31:21 ? wired to zero 0r 20:16 vsw specifies the vertical sync signal pulse width using the number of lines. 0x03 r/w 15:0 ? wired to zero 0r vertical display start register (vdsr) for layers a/e, b and c bit 31 2221 1615 0 name ? vds ? bit name function reset value r/w 31:21 ? wired to zero 0r 21:16 vds these bits specify the vertical display start position using the number of lines, starting from the vsync * signal falling edge. 0x04 r/w 15:0 ? wired to zero 0r note: the lowest value allowed for vds is 2 hex . vertical display start register (vdsrd) for layer d bit 31 2625 1615 0 name ? vdsd ? bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 vdsd these bits specify the vertical display start position using the number of lines, starting from the vsync * signal falling edge. 0x0f6 r/w 15:0 ? wired to zero 0r note: the lowest value allowed for vdsd is 2 hex .
chapter 3 graphics display controller (gdc) preliminary 3-20 vertical display end register (vder) for layers a/e, b and c bit 31 2625 1615 0 name ? vde ? bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 vde these specify the vertical display end position using the number of lines, starting from the vsync * signal falling edge. number of display period lines = vde - vds 0x0f6 r/w 15:0 ? wired to zero 0r note: the lowest value allowed for vde is 2 hex . vertical display end register (vderd) for layer d bit 31 2625 1615 0 name ? vded ? bit name function reset value r/w 31:26 ? wired to zero 0r 25:16 vded these specify the vertical display end position using the number of lines, starting from the vsync * signal falling edge. number of display period lines = vded ? vdsd 0x0f6 r/w 15:0 ? wired to zero 0r note: the lowest value allowed for vded is 2 hex .
chapter 3 graphics display controller (gdc) preliminary 3-21 3.5 setting examples display characters: horizontal synchronous cycle is 64 sec/line, vertical synchronous cycle is 16.678 msec/screen. if dotclk = 3 mhz ? dckps = 0x9, hc = 64 s 3 mhz = 192 dots, vc = 16.768 ms 1/64 s = 262 lines. when displaying a 160-dot 225-line (32 dots 32 lines for layer d) picture out of a 368 270-frame, and the frame buffer is sdram, then sara=0xa0000000, (physical: 0x50000000) sarb=0xa0400000, (physical: 0x50200000) sarc=0xa0800000, (physical: 0x50400000) sard=0xa0c00000, (physical: 0x50600000) mwra=0x5c, mwrb=0x5c, mwrc=0x2e, mwrd=0x0a. please note that the defined start addresses are logical addresses. the physical start address is defined as the right shifted logical address and a zero as msb (see chapter 3.4 ?start address register? figure 3.4.1). the following are example register settings while internal synchronization signals hsync and vsync are used: htn = 0x05, htnd = 0x01, hds = 0x17, hde = 0xb7, hdsd = 0x37, hded = 0x57, hc = 0xc0, vc = 0x106, hsw = 0x0f, vsw = 0x04, vds = 0x1b, vde = 0xfc, vdsd = 0x3b, vded = 0x5b.
chapter 3 graphics display controller (gdc) preliminary 3-22 display area layer a, b or c frame buffer layer a, b or c frame buffer layer d display area layers a, b and c blanking area display area layer d dot 1 dot 64 dot 87 dot 192 dot 191 dot 32 line 1 line 27 line 59 line 91 line 252 line 262 display area layer a, b or c display area layer d hdser mwrd hdserd mwra, mwrb or mwrc display view memory view figure 3.5.1 picture composition from frame buffer to display using example register settings
chapter 3 graphics display controller (gdc) preliminary 3-23 d1 d2 d3 dn dn-2 horizontal invalid data period horizontal invalid data period hsw = 15 hds (23) + 9 = 32 hde(183) + 8 = 191 htn(5) 32 = 160 hc = 192 dot clock hsync hdisp display data l1 l2 l3 ln ln-1 vertical invalid data period vertical invalid data period vsw = 4 vds = 27 vde = 252 vc = 262 hsync vsync display data 1 15 32 191 192 4 1 27+15 252 262 hde ? hds = 160 vde - vds = 225 dn-1 vdisp figure 3.5.2 display signals using internal dot clock and internal sync signals; signals hdisp and vdisp show active display area in horizontal and vertical direction respectively (note that vdisp is an internal signal only)
chapter 3 graphics display controller (gdc) preliminary 3-24 the following are example register settings while external synchronization signals hsync and vsync are used: same as internal synchronization signals: htn = 0x05, htnd = 0x01, vds = 0x1b, vde = 0xfc, vdsd = 0x3b, vded = 0x5b. different from settings using internal synchronization signals: hds = 0x14, hde = 0xb4, hdsd = 0x34, hded = 0x54. not relevant registers: hc, vc, hsw, vsw. the display shows the same picture with the selected external synchronization signals hsync and vsync as in case of internal synchronization signal described before.
chapter 3 graphics display controller (gdc) preliminary 3-25 vds = 27 vde = 252 vde - vds = 225 d1 d2 d3 dn dn-1 horizontal invalid data period horizontal invalid data period hds (19) + 9 = 32 hde(179) + 8 = 191 htn(5) x 32 = 160 dot clock external hsync hdisp display data l1 l2 l3 ln ln-1 vertical invalid data period vertical invalid data period vertical cycle time = 16,768 ms hsync external vsync display data 116 32 191 192 4 1 27+15 252 262 hde ? hds = 160 internal vsync internal hsync 4 horizontal cycle time = 64 s vdisp figure 3.5.3 display signals using internal dot clock and external sync signals (note that vdisp is an internal signal only)
chapter 3 graphics display controller (gdc) preliminary 3-26
chapter 4 interrupt controller (intc) preliminary 4-1 4. interrupt controller (intc) the interrupt controller has the following purpose: ? show the cause of an interrupt ? make it possible for software to mask all interrupts, except the nmi ? handle 3 external interrupt pins ? handle non-maskable-interrupt (nmi) 4.1 basic interrupt handling the following list shows the basic steps of an interrupt handler: 1. change status register of cpu to inhibit interrupts with equal or lesser priority. 2. read cause register of cpu to get cause of interrupt. (see also table below) 3. read irqr of interrupt controller to get more information about interrupt source. 4. run interrupt routine. 5. reset interrupt in source. 6. reset bit of interrupt source in irqr of interrupt controller. 7. restore status register of cpu and jump back to program. the following table shows all interrupt sources and the corresponding interrupt pin on the cpu: interrupt source interrupt pin of cpu interrupt source interrupt pin of cpu external interrupt 0 int2 dmac int2 external interrupt 1 int3 gdc int2 external interrupt 2 int3 port int4 pwm timer int1 txcan int4 periodic timer 0 int0 txsei int4 periodic timer 1 int1 uart int5
chapter 4 interrupt controller (intc) preliminary 4-2 4.2 registers register overview name phys. address (hex) function irqr 1c04 0000 indicates interrupt sources imaskr 1c04 0004 enables/ disables interrupts ilext 1c04 0008 edge/ level detection of external interrupts interrupt request register (irqr), interrupt mask register (imaskr) irqr : if an interrupt occurs, the corresponding bit is set to 1. writing 0 to a bit resets the contents. writing 1 to a bit does not change the contents. imaskr : 1 = enables interrupt 0 = disables interrupt (an incoming interrupt will be stored in irqr, but no interrupt request will be sent to cpu) bit 3130292827262524 name ext2 ext1 ext0 gdc dmac1 dmac0 t1 t0 bit 2322212019181716 name mpwm (1) seiexc can1exc can0exc sio3exc sio2exc sio1exc sio0exc bit 151413121110 9 8 name pwm port seitx seirx can1tx can1rx can0tx can0rx bit 76543210 name sio3tx sio3rx sio2tx sio2rx sio1tx sio1rx sio0tx sio0rx (1) only in imaskr, in irqr this bit is wired to zero bit name cause of interrupt reset value r/w 31 ext2 external interrupt 2 0r/w 30 ext1 external interrupt 1 0r/w 29 ext0 external interrupt 0 0r/w 28 gdc vertical or horizontal sync. on gdc 0r/w 27 dmac1 dma on channel 1 finished or error on channel 1 0r/w 26 dmac0 dma on channel 0 finished or error on channel 0 0r/w 25 t1 periodic timer 1 0r/w 24 t0 periodic timer 0 0r/w 23 mpwm overflow on pwm timer enable (only in imaskr, in irqr this bit is wired to zero) 0 r/w 22 sei exc exception during txsei transfer 0r/w 21 can1 exc status change in txcan1 0r/w 20 can0 exc status change in txcan0 0r/w 19 sio3 exc exception during serial i/o on uart channel 3 0r/w 18 sio2 exc exception during serial i/o on uart channel 2 0r/w 17 sio1 exc exception during serial i/o on uart channel 1 0r/w 16 sio0 exc exception during serial i/o on uart channel 0 0r/w
chapter 4 interrupt controller (intc) preliminary 4-3 bit name cause of interrupt reset value r/w 15 pwm pwm counter reached compare value or overflow of pwm counter if enabled by bit 23 of imaskr 0 r/w 14 port interrupt from port module 0r/w 13 sei tx transmission on txsei finished 0r/w 12 sei rx reception on txsei finished 0r/w 11 can1 tx transmission on txcan1 finished 0r/w 10 can1 rx reception on txcan1 finished 0r/w 9 can0 tx transmission on txcan0 finished 0r/w 8 can0 rx reception on txcan0 finished 0r/w 7 sio3 tx transmission on uart channel 3 finished 0r/w 6 sio3 rx reception on uart channel 3 finished 0r/w 5 sio2 tx transmission on uart channel 2 finished 0r/w 4 sio2 rx reception on uart channel 2 finished 0r/w 3 sio1 tx transmission on uart channel 1 finished 0r/w 2 sio1 rx reception on uart channel 1 finished 0r/w 1 sio0 tx transmission on uart channel 0 finished 0r/w 0 sio0 rx reception on uart channel 0 finished 0r/w ilext the register ilext controls edge or level detection of all external interrupt pins. when edge detection is enabled, an interrupt is caused on falling edge. when level detection is enabled, an interrupt is caused on low level. on level detection the bits in irqr show the current level of the external interrupt pin. before you can clear the interrupt, the external interrupt signal must be set to 1. bit 3130292827 0 name ? lext2 lext1 lext0 ? bit name function reset value r/w 31 ? wired to zero 0r 30 lext2 0 = edge detection on external interrupt 2 (falling edge) 1 = level detection on external interrupt 2 (low level) 0 r/w 29 lext1 0 = edge detection on external interrupt 1 (falling edge) 1 = level detection on external interrupt 1 (low level) 0 r/w 28 lext0 0 = edge detection on external interrupt 0 (falling edge) 1 = level detection on external interrupt 0 (low level) 0 r/w 27:0 ? wired to zero 0r
chapter 4 interrupt controller (intc) preliminary 4-4 4.3 non maskable interrupt the TMPR3916 generates a non-maskable interrupt exception of the transition from high to low of the nmi* signal. to generate the next non-maskable interrupt exception, the nmi* signal must be set to high again and then to low. the tx39 core completes the current bus operation, before it acknowledges the non-maskable interrupt exception. when the tx39 is not owner of the bus at the moment, the non-maskable interrupt occurs, the non-maskable interrupt must wait until tx39 regains the busmastership.
chapter 5 timer preliminary 5-1 5. timer the timer module contains the following features: ? two periodic timers with variable intervals ? a pwm timer with variable interval / pulse width (pwm = pulse width modulation) 5.1 pwm timer the pwm timer contains a 16 bit counter. the timer module sends an interrupt, when the counter reaches a programmable compare value. in addition an interrupt can be sent on the overflow of the counter, if the bit 23 (mpwm) of imaskr in the interrupt controller is set. the pwm counter starts after the bit 15 (pwm) of imaskr in the interrupt controller is set. setting bit 15 of imaskr to 0 will clear the pwm counter. ff mux / 2 pwmpre[2:0] 16 bit counter en comparator pwmval[15:0] programmable register p mask ? mpwm irqr[15] -> 1 int[1] t1 int clr carry & mpwmcarry ff ff ff ff ff / 4 / 8 / 16 / 32 / 64 t figure 5.1.1 block diagram for interrupt generation
chapter 5 timer preliminary 5-2 use the following formula to calculate the time between start of the pwm counter and send of pwm interrupt (pulse width): pwmval = compare value of pwm timer (see register description of pwmval) pwmval time to pwm interrupt = ------------------------ 1 / prescaler system frequency use the following formula to calculate the time between start and overflow of the pwm counter: 65536 time to pwm interrupt = ------------------------ 1 / prescaler system frequency register overview name phys. address (hex) function pwmval 1c01 0008 compare value for 16 bit pwm counter pwm value register (pwmval) bit 31 1615 3210 name pwmval ? pwmpre bit name function reset value r/w 31:16 pwmval compare value of pwm counter if the pwm counter reaches the value of this register an interrupt is generated. 0x007f r/w 15:3 ? wired to zero 0r 2:0 pwmpre prescaler of pwm counter the following clock is used to provide pwm counter: 000 = 1/2 system clock 001 = 1/4 system clock 010 = 1/8 system clock 011 = 1/16 system clock 100 = 1/32 system clock 101,110,111 = 1/64 system clock 101 r/w
chapter 5 timer preliminary 5-3 5.2 periodic timers both periodic timers are running all the time. every time they reach the end of the interval, they cause an interrupt. the interrupt is maskable in the interrupt controller (intc). both periodic timers use the same prescaler. use the following formula to calculate the interval: t0int = interval settings of periodic timer 0 (see register description of titr) t1int = interval settings of periodic timer 1 (see register description of titr) 2 (t0int + 8) interval of timer 0 = ------------------------ 1 / prescaler system frequency 2 (t1int + 9) interval of timer 1 = ------------------------ 1 / prescaler system frequency note that at the same settings timer 0 has twice the speed of timer 1. example: t0int = interval setting of periodic timer 0 = 010 (bin) = 2 (dec) tpre = prescaler setting = 100 (bin) ? prescaler = 1 / 32 (dec) 2 (2 + 8) 32768 interval of timer 0 = -------------- 32 = ------------ = 0.55 msec 60 mhz 60 mhz register overview name phys. address (hex) function timer 1c01 0000 16 bit free-running counter titr 1c01 0004 settings for periodic timer timer register (timer) bit 31 16 15 0 name tval ? bit name function reset value r/w 31:16 tval free running counter the free running counter provides the periodic timers. the counter operates continuously on output clock of the prescaler. write this register only using full word access. 0x0000 r/w 15:0 - wired to zero 0x0000 r
chapter 5 timer preliminary 5-4 titr bit 31 2726252423 19181716 name ? t1int ? t0int bit 15 3210 name ? tpre bit name function reset value r/w 31:27 ? wired to zero 0r 26:24 t1int interval of periodic timer 1 for interval calculation see above formula 000 r/w 23:19 ? wired to zero 0r 18:16 t0int interval of periodic timer 0 for interval calculation see above formula 000 r/w 15:3 ? wired to zero 0r 2:0 tpre prescaler for timer 0 and timer 1 the following clock is used to provide the periodic timer: 000 = 1/2 system clock 001 = 1/4 system clock 010 = 1/8 system clock 011 = 1/16 system clock 100 = 1/32 system clock 101, 110, 111 = 1/64 system clock the prescaler bits read back as zero. 101 w
chapter 6 direct memory access controller (dmac) preliminary 6-1 6. direct memory access controller (dmac) the purpose of the direct memory access controller (dmac) is to accelerate system speed and to make it easier for software to transfer data between memory and peripheral devices. the dma controller contains the following features : ? the dmac consists of two independent channels: channel 0 and channel 1. channel 0 has higher priority than channel 1 on gbus transfers. ? dma transactions are only possible from device to memory or from memory to device . devices are for example uart and txsei. ? the dma transfer will start after request of a peripheral device. that?s why only data transfer will happen, when the device needs data. the uarts, the txsei or an external device can send a request. ? at the end of a transaction or at the occurrence of an error an interrupt will be caused. the interrupt is only maskable in the interrupt controller (intc). the following sequence shows the principle use of the dma controller to transfer data between memory and a peripheral device: 1. configure the dma and the peripheral device. set the number of bytes to be transferred. 2. the dma controller waits for a request of the peripheral device. 3. the dma controller transfers data between memory and the peripheral device. 4. the dma controller sends an acknowledge to the peripheral device. 5. if there are more bytes left to transfer go to point 2. 6. the dma controller causes an interrupt.
chapter 6 direct memory access controller (dmac) preliminary 6-2 6.1 programming the dma controller the programming of both channels are done in the same way. all register values are given in hexadecimal format. 6.1.1 start dma transaction between memory and txsei/ uart the dma transaction between memory and txsei/uart is the main application of the dma controller. these transactions are only possible as 32-bit word transfers . one data piece fills the lower bits of the memory word. for example: the bytes 0x6e and 0x37 shall be transmitted over the uart. first these bytes have to be stored in bits [7:0] of the words in the memory. the first word in the memory is then 0x0000006e and the second word is 0x00000037. in case of a receive, the data will be stored in the memory in the same way. the rest of the word (higher bits) will be filled with a random value. execute the following steps to start a dma transaction: 1. write the table value in ? bits [3:0] of the chip configuration register (ccr) for channel 0 : ? bits [7:4] of the chip configuration register (ccr) for channel 1 : device memory >> device (transmit) device >> memory (receive) sio 0 0x0 0x1 sio 1 0x2 0x3 sio 2 0x4 0x5 sio 3 0x6 0x7 txsei 0x8 0x9 2. memory >> device: write the start pointer of your sending data into the source address register (sar). write the address of the device data register into the destination address register (dar). device >> memory: write the address of the device data register into the source address register (sar). write the start pointer of your receiving data into the destination address register (dar). note: you must write the physical addresses into the registers sar and dar. all addresses have to be word aligned. 3. write the number of bytes you want to transfer into the byte count register (bcr). note: the dma controller transfers a 32-bit word in every step. that?s why the byte count must be at least 4. in addition, it must be possible to divide the contents of the byte count register by 4.
chapter 6 direct memory access controller (dmac) preliminary 6-3 4. memory >> device: write the value 0xa9 into the operation definition register (odr). device >> memory: write the value 0x69 into the operation definition register (odr). write the value 0x11 into the channel control register (ccr). now the dma controller waits for a request of the external device to start the first transfer. 5. configure and start the devices txsei or uart. after dma transaction has finished, the dma controller sets the opc bit (bit 0) in the channel status register (csr) and generates an interrupt. each channel has its own interrupt signal. the interrupts are only maskable in the interrupt controller. to terminate a running dma transaction, set bit 22 (abt) in the channel control register (ccr). 6.1.2 start dma with external device the TMPR3916 has one pin for an external dma request signal. for instance the external request makes sense together with a port module. the procedure is similar to a uart/ txsei transaction. for details of the procedure see section ?start dma transaction between memory and txsei/uart? and the register description. the following steps are executed to start a dma transaction: 1. write the hexadecimal-value 0xa in ? bits [3:0] of the chip configuration register (ccr) for channel 0 ? bits [7:4] of the chip configuration register (ccr) for channel 1 2. define source and destination address in registers sar and dar. 3. write the number of bytes you want to transfer into bcr. 4. write the following value into odr: application memory >> device (transmit) device >> memory (receive) edge detection on external request 0xa8 0x68 level detection on external request 0xa9 0x69 write the following value into ccr: application memory >> device (transmit) device >> memory (receive) positive logic on external request 0x19 0x19 negative logic on external request 0x11 0x11 now the dma controller waits for a request of the external device to start the first transfer. 5. configure and start external device. when the dma controller starts its first transfer, it sets the external acknowledge signal to 0. after finishing the whole dma transaction, the dma controller sets the external acknowledge signal to 1.
chapter 6 direct memory access controller (dmac) preliminary 6-4 6.1.3 potential problems one of the following reasons can be responsible for an error: ? the software has made invalid settings in the operation definition register (odr) or in the channel control register (ccr). ? the software has defined an address in the source or destination address register (sar or dar) that does not exist. the access to this address has caused a bus error. ? either the byte count, the source address or the destination address is not correctly aligned. the dma controller sends an interrupt, when an error occurs. these steps need to be executed in case of an error: 1. read the contents of the channel error register (cer) to get the cause of the error. 2. for details see the register description. 3. write 0x80 into the channel control register (ccr). 4. write 0x00 into the channel status register (csr). 5. start the whole dma programming procedure from the first point.
chapter 6 direct memory access controller (dmac) preliminary 6-5 6.2 registers overview: register (short name) physical address (hex) name function odr0 odr1 1c060000 1c060010 operation definition register basic channel settings ccr0 ccr1 1c060001 1c060011 channel control register controls channel operations cer0 cer1 1c060002 1c060012 channel error register cause of an error or interrupt csr0 csr1 1c060003 1c060013 channel status resister channel operating status sar0 sar1 1c060004 1c060014 source address register specifies the address, where to get data from dar0 dar1 1c060008 1c060018 destination address register specifies the address, where to write data to bcr0 bcr1 1c06000c 1c06001c byte count register specifies the number of transfer data in byte units operation definition register (odr) bit 3130292827262524 name sac dac psiz osiz msiz bst bit name function reset value r/w 31 sac specifies, if the source address register should count up. 0 = source address does not count up (device to memory transfer) 1 = source address counts up on each transfer (memory to device transfer) this bit should be set to 0, when the dac bit is set to 1. 0 r/w 30 dac specifies, if the destination address register should count up. 0 = destination address does not count up (memory to device transfer) 1 = source address counts up on each transfer (device to memory transfer) this bit should be set to 0, when the sac bit is set to 1. 0 r/w 29:28 psiz specifies the size of the device data register. 00 = 8 bits, register bits [31:24] 01 = 16 bits, register bits [31:16] 10 = 32 bits, register bits [31:0] 11 = setting prohibited 00 r/w 27:26 osiz specifies the width of dma transfer. 00 = 8 bits 01 = 16 bits 10 = 32 bits 11 = setting prohibited 00 r/w 25 msiz specifies the bus width of the memory. 0 = 32 bits 1 = 16 bits (there is no use for this setting) 0 r/w 24 bst specifies the detection mode for the request signal from the device. 0 = edge detection 1 = level detection for uart and txsei request signals use level detection. 0 r/w
chapter 6 direct memory access controller (dmac) preliminary 6-6 channel control register (ccr) bit 2322212019181716 name rst abt ? cen rpl ?? ete bit name function reset value r/w 23 rst performs a software reset on all of the channel registers. 0 = normal operation 1 = executes software reset 0 r/w 22 abt termination of channel operations regardless of the operating status. 0 = normal operation 1 = termination of current dma transaction 0 r/w 21 ? wired to zero. 0r/w 20 cen sets the channel to operating mode. 0 = channel is inactive 1 = start dma transaction 0 r/w 19 rpl specifies the polarity of the device request signal. 0 = negative logic (low level / falling edge) 1 = positive logic (high level / rising edge) uart and txsei use negative logic. 0 r/w 18:17 ? wired to zero 00 r 16 ete decides if the request signal from a device is provided to the dmac. 0 = no request signal is provided to the dmac 1 = request signal is provided to the dmac without setting this bit to 1, the dma controller does not start a transaction. 0 r/w channel error register (cer) bit 151413121110 9 8 name swa ber ace conf sbe dbe bce aer bit name function reset value r/w 15 swa software abort: if this bit is set to 1, the software has terminated the current dma transaction 0 r 14 ber bus error: if this bit is set to 1, a bus error has occurred on dma transfer. 0 r 13 ace address or count error: (ace = bce + aer) if this bit is set to 1, a byte count error (bce, bit 9) or an address boundary error (aer, bit 8) has occurred. 0 r 12 conf configuration error: if this bit is set to 1, the software has made invalid settings in the operation definition register (odr) or in the channel control register (ccr). 0 r 11 sbe bus error on source address access: if this bit is set to 1, a bus error has occurred during read from a source. 0 r 10 dbe bus error on destination address access: if this bit is set to 1, a bus error has occurred during write to a destination. 0 r
chapter 6 direct memory access controller (dmac) preliminary 6-7 bit name function reset value r/w 9 bce byte count error: if this bit is set to 1, the software has stored a value in the byte count register, which is not correctly aligned. for example: when the dma controller transfers 32 bit words, it must be possible to divide the contents of the byte count register by 4. 0 r 8 aer address error: if this bit is set to 1, the software has stored a value in the source- or destination address register, which is not correctly aligned. for example: when the dma controller transfers 32 bit words, the lower two bits of the source- and the destination address register must be zero. 0 r channel status register (csr) bit 76543210 name ????? act exc opc bit name function reset value r/w 7:3 ? wired to zero 0r 2 act channel operation status if this bit is set to 1, the channel is executing a dma. 0 r 1 exc exception if this bit is set to 1, an error has occurred during dma transfer. the cause of error is shown in the channel error register (cer). you can delete the exception by writing 0 to this bit. writing 1 to this bit shows no effect. 0 r/w 0 opc operation successfully completed if this bit is set to 1, the dma transaction has finished without any errors. 1 r source address register (sar) bit 31 24 23 0 name sal sac bit name function reset value r/w 31:24 sal base address this part of the source address will not count up. 0 r/w 23:0 sac address offset this part of the source address will count up on every read, when the dma controller transfers data from memory to a peripheral device. 0 r/w
chapter 6 direct memory access controller (dmac) preliminary 6-8 destination address register (dar) bit 31 24 23 0 name dal dac bit name function reset value r/w 31:24 dal base address this part of the destination address will not count up. 0 r/w 23:0 dac address offset this part of the destination address will count up on every write, when the dma controller transfers data from a peripheral device to the memory. 0 r/w byte count register (bcr) bit 31 24 23 0 name ? bc bit name function reset value r/w 31:24 ? unused 0r 23:0 bc these bits contain the number of bytes left to transfer. the dma controller decrements the contents of this register after every transfer. 0 r/w
chapter 7 can module (txcan) preliminary 7-1 7. can module (txcan) outline and features of txcan: ? 2.0 b active ? standard identifier and remote frames ? extended identifier and remote frames ? full-can controller ? 16 mailboxes (15 receive & transmit + 1 receive-only) ? baud rate up to 1 mbit/sec on the can bus at minimum 8 mhz system clock ? extended prescaler ? bit timing parameter like intel 82527? ? selectable mechanism for internal arbitration of transmit messages ? time-stamp for receive and transmit messages ? readable error counters ? warning level irq, error passive irq, bus-off irq ? local loop back test mode (self acknowledge) ? programmable global mask for mailboxes 0-14 ? programmable local mask for mailbox 15 ? acceptance mask register for identifier extension bit ? flexible interrupt structure ? flexible status interface ? sleep mode ? wake-up on can-bus activity or mcu access
chapter 7 can module (txcan) preliminary 7-2 7.1 block diagram register bank & interrupt logic can protocol controller txcan state machine mcu interface & access arbiter mailbox ram 16 * 128 temporary transmit buffer acceptance filter time stamp counter reset controller, clock & sleep logic address / data control signals goes to the whole design rx/ tx control add/ data clock/ reset txcan temporary receive buffer figure 7.1.1 block diagram can module 7.1.1 message buffers the message storage is implemented in a single-port ram, which can be addressed by the inner can core and the mcu. the mcu controls the can controller by modifying the various mailboxes in the ram or the configuration registers. in order to initiate a transfer, the transmission request bit has to be set in the corresponding register. afterwards the entire transmission procedure and possible error handling is done without any mcu involvement. if a mailbox has been configured as receive the mcu reads the mailbox data using mcu read instructions. the mailbox can be configured to interrupt the mcu after every successful message transmission or reception. the mailbox module provides 16 mailboxes of 8-byte data length, 29 bit identifier and several control bits. each mailbox can be configured as either transmit or receive, except for mailbox 15. this mailbox is a receive-only buffer with a special acceptance mask designed to select groups of message identifiers to be received. the mailbox area is implemented in a single-port-ram. 7.1.2 electrical can-interface the interface to the can bus is a simple two-wire line consisting of an input pin rx and an output pin tx. the pins are thought to operate with can bus transceivers according to iso/dis 11989 (e.g. philips pca 82c252, bosch cf150 or siliconix si 9200).
chapter 7 can module (txcan) preliminary 7-3 7.2 txcan registers txcan local memory map physical base address channel 1 = 1c07 0000 (hex) physical base address channel 2 = 1c07 8000 (hex) offset address name description 0x000 dpram mailbox ram (mailbox 0) : 0x0f0 dpram mailbox ram (mailbox 15) 0x100 mc mailbox configuration register 0x104 md mailbox direction register 0x108 trs transmit request set register 0x10c trr transmit request reset register 0x110 ta transmission acknowledge register 0x114 aa abort acknowledge register 0x118 rmp receive message pending register 0x11c rml receive message lost register 0x120 lam local acceptance mask register 0x124 gam global acceptance mask register 0x128 mcr master control register 0x12c gsr global status register 0x130 bcr1 bit configuration register 1 0x134 bcr2 bit configuration register 2 0x138 gif global interrupt flag register 0x13c gim global interrupt mask register 0x140 mbtif mailbox transmit interrupt flag register 0x144 mbrif mailbox receive interrupt flag register 0x148 mbim mailbox interrupt mask register 0x14c cdr change data request 0x150 rfp remote frame pending register 0x154 cec can error counter register 0x158 tsp time stamp counter prescaler 0x15c tsc time stamp counter
chapter 7 can module (txcan) preliminary 7-4 7.2.1 mailbox structure the following picture shows the structure of the mailbox ram: id0 id1 id2 id3 tsv1 tsv0 mcf d0 d1 d2 d3 d7 d6 d5 d4 0 7 8 15 16 24 23 31 id0 id1 id2 id3 tsv1 tsv0 mcf d0 d1 d2 d3 d7 d6 d5 d4 address 0x000 0x004 0x008 0x00c 0x0f0 0x0f4 0x0f8 0x0fc mailbox 0 mailbox 15 byte 0 byte 1 byte 2 byte 3 halfword 0 halfword 1 word figure 7.2.1 mailbox ram structure each mailbox consists of 16 bytes. the first 4 bytes id0 to id3 contain the identifier. byte 4 (mcf) contains the message control field and byte 5 is unused. byte 6 and 7 are reserved for the time stamp value tsv of an implemented free running counter that indicates when a message was received or transmitted. the data field consists of the bytes d0 to d7. one mailbox includes the following data: ? 29 bit identifier, 11 bit base id and 18 bit extended id (id0-id3) ? identifier extension bit (ide) (id3, bit 7) ? global (local) acceptance mask enable bit game (lame) (id3, bit 6) ? remote frame handling bit rfh (id3, bit 5) ? remote transmission request bit (rtr) (mcf, bit 4) ? data length code (dlc) (mcf, bit 0-3) ? up to eight bytes for the data field (d0-d7) ? two bytes for the time stamp value (tsv)
chapter 7 can module (txcan) preliminary 7-5 message identifier (id0 .. id3) bit 31302928 1817 0 name ide game rfh id bit name function 31 ide kind of frame (length of identifier) 0 = standard frames (can 2.0a), 11 bit identifier 1 = extended frames (can 2.0b), 29 bit identifier 30 game use of global acceptance mask (mailbox 0 to 14) 0 = the received message will only be stored, when the received identifier is identical to that in the mailbox. 1 = the global acceptance mask will be used for acceptance filtering. the bit 30 of mailbox 15 is called lame and determines, if the local acceptance mask will be used for acceptance filtering. always set game to ?0? for transmit mailboxes. 29 rfh remote frame handling (only for transmit mailboxes) 0 = software must handle remote frames 1 = the mailbox will automatically respond to remote frames 28:18 id identifier contains standard identifier or first bits of extended identifier 17:0 id identifier contains the last bits of extended identifier time stamp value (tsv)/message control field (mcf) bit 31 16 name tsv bit 15 543210 name ? rtr dlc bit name function 31:16 tsv time-stamp counter value txcan contains a 16 bit time-stamp-counter. the value of the time-stamp-counter is stored after the reception and after the transmission of a message. please refer to chapter ?7.2.8 time stamp feature? for a full description of the time-stamp counter?s function. 15:5 ? no function 4 rtr remote frame transmission request 0 = normal frame 1 = remote frame 3:0 dlc data length these bits contain the number of data bytes transferred by the frame. only the values 0000(bin) to 1000(bin) are allowed. if these bits are set to 1001(bin) or more, the txcan will send 8 data bytes.
chapter 7 can module (txcan) preliminary 7-6 7.2.2 control registers mailbox configuration register (mc) bit 15 0 name mc bit name function reset value mode 15:0 mc mailbox enable 0 = the corresponding mailbox mbn is disabled for the can module and the write access to the identifier field of the mailbox is possible. 1 = the mailbox is enabled for the txcan state machine. write access to the identifier field of an enabled mailbox is denied. write access to the data field and control field of a mailbox is always possible. after power-up, all bits in mc are cleared and all mailboxes are disabled. 0 r/w special care is required during reprogramming of mc in operation: for a receive mailbox it needs to be ensured that the mailbox is not being disabled while a reception for this mailbox is ongoing. if a mailbox is disabled during an ongoing reception, the user must be aware that the current frame might be received, even though the mailbox has been disabled or reconfigured during the reception of the incoming can frame. a transmit mailbox may never be disabled, when a transmit request is pending. mailbox direction register (md) bit 15 14 0 name md15 md14 .. md0 bit name function reset value mode 15 md15 mailbox direction of mailbox 15 mailbox 15 is receive-only. this bit is always 1 and cannot be changed. 1 r 14:0 md14 to md0 mailbox direction of mailboxes 14 to 0 each mailbox can be configured as transmit mailbox or receive mailbox. 0 = transmit mailbox 1 = receive mailbox 0 r/w the direction of mailboxes may not be changed in operation. a mailbox needs to be disabled before its direction may be changed.
chapter 7 can module (txcan) preliminary 7-7 7.2.3 message transmission the transmission control consists of two registers. one register for setting (trs) and one for resetting (trr) the transmission request. in this manner it is possible to clear the transmission request without generating a conflict in the handling of the transmit mailboxes in the state-machine. this mechanism also prevents the clearing of the transmission request of a mailbox which transmission is already in progress. the data to be transmitted will be stored in a mailbox configured as transmit mailbox (mdn = 0). after writing the data and the identifier into the mailbox ram, the message will be sent if the corresponding trs bit has been set and the mailbox is enabled (mcn = 1). if there is more than one mailbox configured as transmission mailbox and more than one corresponding trs bit is set, then the messages will be sent in the selected order. the order of transmission can be selected in the master control register (mcr). if mtos is set to ?0?, the mailbox with the lower number has the higher priority. for example: if the mailboxes mb0, mb2 and mb5 are configured for transmission and the corresponding trs bits are set, then the messages will be transmitted in the following order: mb0, mb2 and mb5. if a new transmission request is set for mb0 during the processing of mb2 then in the next internal arbitration- run mb0 will be selected for the next transmission. this will also happen, when the txcan loses arbitration while transmitting mb2. in this case, mb0 will be sent at the next opportunity instead of mb2. if mtos is set to ?1?, the priority of the identifier stored in the mailbox will determine the sending order. the mailbox with the higher priority identifier will be sent first. in case of a lost arbitration on the can bus line a new internal arbitration run will be started and the message with the highest priority will be sent at the next possible time. transmission request set register (trs) bit 15 14 0 name ? trs bit name function reset value mode 15 ? wired to zero 0r 14:0 trs setting trsn causes the particular message ?n? to be transmitted. several bits can be set simultaneously. the messages will be sent one after the other in the selected transmission order. the transmission order can be selected by the mtos bit in the master control register (mcr). the bits in trs will be set by writing ?1? at the corresponding bit position from the mcu. writing a ?0? has no effect. after power-up, all bits are cleared. 0 r/s the trs bits can only be set by the mcu and will be reset by internal logic in case of a successful transmission or an aborted transmission (if requested by setting the corresponding trr bit) or a hard/software reset. bit 15 is not implemented because the mailbox 15 is the receive-only mailbox. if a mailbox is configured as receive the corresponding bit in trs can not be set by mcu.
chapter 7 can module (txcan) preliminary 7-8 transmission request reset register (trr) bit 15 14 0 name ? trr bit name function reset value mode 15 ? wired to zero 0r 14:0 trr setting trrn causes a transmission request to be cancelled that was initiated by the corresponding bit trsn, provided that the transmission of this mailbox is not currently in process. if the corresponding message is currently processed the bit will be reset in the following cases: a successful transmission (normal operation), an aborted transmission in case of a lost arbitration or an error condition detected on the can bus line. in case of an aborted transmission, the corresponding status bit aan will be set and in case of a successful transmission, the status bit tan will be set. the bits in trr will be set by writing a ?1? from the mcu. writing a ?0? has no effect. after power-up, all bits are cleared. 0 r/s these bits can only be set by the mcu and reset by the internal logic. they will be reset by internal logic in case of a successful transmission or an aborted transmission. bit 15 is not implemented because the mailbox 15 is the receive-only mailbox. if trrn is set the write access to the corresponding mailbox is denied. if a mailbox is configured as receive the corresponding bit in trr cannot be set by mcu. note: when trsn is set, after setting trrn to ?1?: ? a transmission request of a message, which is not currently in process, will be cleared immediately (trsn 0, trrn 0, aan 1). ? a transmission request of a message which is currently processed will be cleared in case of a lost arbitration or an error condition on the can bus (trsn 0, trr 0, aan 1). ? a transmission request of a message which is currently processed will not be cleared if there is no lost arbitration and no error condition on the can bus (trsn 0, trrn 0, tan 1). transmission acknowledge register (ta) bit 15 14 0 name ? ta bit name function reset value mode 15 ? wired to zero 0r 14:0 ta if the message of mailbox ?n? has been transmitted successfully, the bit ?n? of this register will be set and a transmission successful interrupt is generated, if it is enabled. the bits in ta will be reset by writing a ?1? from the mcu to ta or trs. writing a ?0? has no effect. after power-up, all bits are cleared. 0 r/c
chapter 7 can module (txcan) preliminary 7-9 abort acknowledge register (aa) bit 15 14 0 name ? aa bit name function reset value mode 15 ? wired to zero 0r 14:0 aa if the transmission of the message in mailbox ?n? has been aborted, the bit ?n? of this register will be set and a transmission abort interrupt is generated, if it is enabled. the bits in aa will be reset by writing a ?1? from the mcu to aa or trs. writing a ?0? has no effect. after power-up, all bits are cleared. 0 r/c change data request (cdr) bit 15 14 0 name ? cdr bit name function reset value mode 15 ? wired to zero 0r 14:0 cdr if the cdr bit of a transmit mailbox is set, a transmission request for this mailbox will be ignored. that means, that a mailbox with trs and cdr set will not be considered in the internal arbitration-run: the mailbox is locked for transmission. the processing of this mailbox in the arbitration-run will be considered again after clearing the cdr bit. after power-up, all bits are cleared. 0 r/w cdr is useful for dealing with remote frames. it is intended for updating the data field of a transmit mailbox, which is configured for automatic reply to remote frames (rfh bit set). by using the cdr bit, the user can update the data field without a need of taking additional care of the data consistency. see also section ?7.5 handling of message-objects?.
chapter 7 can module (txcan) preliminary 7-10 7.2.4 message reception the identifier of each incoming message is compared to the identifiers held in the receive mailboxes. the comparison of the identifiers depends on the value of the global/local acceptance mask enable bit (game/lame) stored in the mailbox and the data held in the global/local acceptance mask (gam/lam). when a matching identifier is detected, the received identifier, the control bits and the data bytes are written into the matching ram location. at the same time the corresponding receive message pending bit rmpn is set and a receive-interrupt is generated, if it is enabled. after finding a matching identifier, no further compare will be done. if no match is detected, the message is rejected. the rmp bit has to be reset by the mcu after reading the data. if a second message has been received for this mailbox and the rmp bit is already set, the corresponding message lost bit (rml) is set. in this case, the stored message will be overwritten with the new data. only if an incoming message does not match to one of the mailboxes 0 to 14, this message will be stored in the receive-only mailbox in case of a matching identifier (acceptance filter). the following figure shows the timing of the flags and the write to the mailbox during message reception: s o f message 1 for mailbox ?n? can bus message is valid set rmp set rml copy id and data to mailbox rmpn register rmln register e o f i f s s o f message 2 for mailbox ?n? e o f i f s figure 7.2.2 timing for writing received message to mailbox, including flags
chapter 7 can module (txcan) preliminary 7-11 receive message pending register (rmp) bit 15 0 name rmp bit name function reset value mode 15:0 rmp if mailbox ?n? contains a received message, bit rmpn of this register will be set. these bits can only be reset by the mcu, and set by the internal logic. a new incoming message will overwrite the stored one. in this case, the corresponding status bit rmln will be set before overwriting begins. the bits in rmp and rml can be cleared by a write access to the register rmp with a ?1? at the corresponding bit location. after power-up, all bits are cleared. 0 r/c receive message lost register (rml) bit 15 0 name rml bit name function reset value mode 15:0 rml if there is an overload condition for mailbox ?n?, bit rmln of this register will be set. these bits can only be reset by the mcu, and set by the internal logic. the bits can be cleared by a write access to the register rmp with a ?1? at the corresponding bit location. after power-up, all bits are cleared. 0 r/c see also section ?7.5 handling of message-objects?.
chapter 7 can module (txcan) preliminary 7-12 7.2.5 remote frame handling if a remote frame has been received, the internal fsm will compare the identifier to all identifiers of the mailboxes. the comparison of the identifiers depends on the value of the bit global/local acceptance mask enable (game/lame) stored in the mailbox and the data held in the global/local acceptance mask (gam/lam). if there is a matching identifier and the rfh bit in this mailbox is set and this mailbox is configured as transmit, this message object will be marked as ?to be sent? (trs will be set). if there is a matching identifier and the mailbox is configured as receive, this message will be handled like a data frame and the corresponding bit in rmp and rfp will be set. after finding a matching identifier, no further compare will be done. remote frame pending register (rfp) bit 15 0 name rfp bit name function reset value mode 15:0 rfp if a remote frame is received in a mailbox configured as receive mailbox, the corresponding bits in rfpn and rmpn are set. the bits in rfp can be cleared by writing a ?1? to the corresponding bit position in rmp. writing a ?0? has no effect. if a remote frame in the mailbox is overwritten by a data frame, the corresponding bit in rfp is cleared. after power-up, all bits are cleared. 0 r/w see also section ?7.5 handling of message-objects?.
chapter 7 can module (txcan) preliminary 7-13 7.2.6 acceptance filtering for the mailboxes 0 to 14, the global acceptance mask (gam) will be used if the bit game in the mailbox is set. an incoming message will be stored in the first mailbox with a matching identifier. only if there is no matching identifier in the mailboxes 0 to 14, the incoming message will be compared to the receive-only mailbox (mailbox 15). if the lame bit in mailbox 15 is set, the local acceptance mask (lam) will be used. the acceptance code in the figure below is the content of the identifier words of the current mailbox. amr 1 rxrqst identifier acceptance code register acceptance mask register acr 0 acr 0 amr 1 acr n amr n figure 7.2.3 acceptance filter logic local acceptance mask (lam) the local acceptance mask register will only be used for filtering messages for mailbox 15. this feature allows the user to locally mask, or ?don?t care?, any identifier bits of the incoming message for mailbox 15. bit 31302928 0 name lami ? lam bit name function reset value mode 31 lami 0 = the identifier extension bit stored in the mailbox determines which messages shall be received. 1 = don?t care: standard and extended frames can be received. in case of an extended frame all 29 bits of the identifier stored in the mailbox and all 29 bits of the local acceptance mask register will be used for the filter. in case of a standard frame, only the first eleven bits (bit 28 to 18) of the identifier and the local acceptance mask will be used. 0 r/w 30:29 ? wired to zero 0r 28:0 lam incoming messages are first checked for an acceptance match in mailbox 0 to 14 before passing through the mailbox 15. a ?1? value means, ?don?t care? or accept a ?0? or ?1? for that bit position. a ?0? value means that the incoming bit value must match identically to the corresponding bit in the message identifier. the global mask has no effect for mailbox 15. after power-up, all bits are cleared. 0 r/w for messages in extended format the identifier extension bit and the whole 29 bits of the identifier will be compared and for messages in standard format only the first 11 bits and the identifier extension bit will be compared. the local acceptance mask will only be used for mailbox 15 (receive-only mailbox).
chapter 7 can module (txcan) preliminary 7-14 global acceptance mask (gam) bit 31302928 0 name gami ? gam bit name function reset value mode 31 gami 0 = the identifier extension bit stored in the mailbox determines which messages shall be received. 1 = don?t care, standard and extended frames can be received. in case of an extended frame all 29 bits of the identifier stored in the mailbox and all 29 bits of the global acceptance mask register will be used for the filter. in case of a standard frame, only the first eleven bits (bit 28 to 18) of the identifier and the global acceptance mask will be used. 0 r/w 30:29 ? wired to zero 0r 28:0 gam for each incoming message, the global acceptance mask will be used if the bit game is set. a received message will only be stored in the first mailbox with a matching identifier. 0 r/w the global acceptance mask will only be used for the mailboxes 0 to 14. after power-up, all bits are cleared. master control register (mcr) bit 151413121110 9 8 name ???? sur intlb tstlb tsterr bit 76543210 name ccr smr tsbtest wuba mtos ? tscc sres bit name function reset value mode 15:12 ? wired to zero 0r 11 sur suspend mode request 0 = normal operation requested 1 = suspend mode is requested 0 r/w 10 intlb internal loop back enable 0 = internal loop back is disabled in test mode 1 = internal loop back is enabled in test mode 0 r/w 9 tstlb test loop back 0 = normal operation requested 1 = test loop back mode is requested. this mode supports stand-alone operation. 0 r/w 8 tsterr test error 0 = normal operation requested 1 = test error mode is requested. in this mode, it is possible to write the error counters (cec). 0 r/w 7 ccr change configuration request. 0 = normal operation requested 1 = write access to the configuration registers (bcr1 and bcr2) requested. 1 r/w 6 smr sleep mode request 0 = the sleep mode is not requested (normal operation). 1 = the sleep mode is requested. 0 r/w
chapter 7 can module (txcan) preliminary 7-15 bit name function reset value mode 5 tsbtest toshiba internal test mode always write this register as ?0?. 0 r/w 4 wuba wake up on bus activity 0 = the module leaves the sleep mode only by detecting a write access to mcr 1 = the module leaves the sleep mode by detecting any bus activity or by detecting a write access to mcr. 0 r/w 3 mtos mailbox transmission order select 0 = mailbox transmission order by mailbox number. the mailbox with the lower number will be sent first. 1 = mailbox transmission order by identifier priority. the mailbox with the higher priority identifier will be sent first. 0 r/w 2 ? wired to zero 0r 1 tscc time stamp counter clear 0 = no effect 1 = the time stamp counter will be cleared. this bit can only be written and will always be read as zero. 0 r/w 0 sres software reset 0 = no effect 1 = a write access to this register causes a software reset of the module (all parameters will be reset to their initial values). this bit can only be written and will always be read as zero. 0 r/w
chapter 7 can module (txcan) preliminary 7-16 7.2.7 bit configuration registers bit configuration register 1 (bcr1) bit 15 8 7 0 name ? brp bit name function reset value mode 15:8 ? wired to zero 0r 7:0 brp brp is the value of the baud rate prescaler. 0r/w bit configuration register 2 (bcr2) bit 151413121110 9 8 name ? sjw bit 76543210 name sam tseg2 tseg1 bit name function reset value mode 15:10 ? wired to zero 0r 9:8 sjw indicates by how many units of time-quantums a bit is allowed to be lengthened or shortened when re-synchronising. 00 = 1 time quantum 01 = 2 time quantums 10 = 3 time quantums 11 = 4 time quantums 0 r/w 7 sam sample point setting (see below) 0r/w 6:4 tseg2 timing setting for sampling point (see below) 0r/w 3:0 tseg1 timing setting for sampling point (see below) 0r/w
chapter 7 can module (txcan) preliminary 7-17 the length of a bit is determined by the parameters tseg1, tseg2 and brp. all controllers on the can bus must have the same baud rate and bit length. at different clock frequencies of the individual controllers, the baud rate has to be adjusted by the mentioned parameters. in the bit timing logic, the conversion of the parameters to the required bit timing is realized. the configuration registers (bcr1, bcr2) contain the data about the bit timing. its definition corresponds to the can specification 2 (like intel 82527). the register content is zero after a reset. nominal bit time sjw tseg2 tseg1 sjw syncseg transmit point sample point figure 7.2.4 required timing parameters for can transmission the length of t scl (can bus system clock) is defined by: osc scl f 1 brp t + = q scl t 1 t 1 ? = ? ( t q = time quantum) f osc is the txcan clock frequency (input clock of the txcan module). this clock is the output of a prescaler with a divider ratio from 2 up to 8. this ratio can be set in the chip configuration register (ccr). the default setting is 3. the synchronization segment syncseg has always the length of one t scl . the baud rate is defined by: scl t ) 1 ) 1 2 tseg ( ) 1 1 tseg (( 1 br ? + + + + = ipt (information processing time) is the time segment starting with the sample point reserved for processing of the sampled bit level. the information processing time is equal to 3 txcan system clock cycles. the parameter sjw (2 bits) indicates, by how many units of t q a bit is allowed to be lengthened or shortened when re-synchronizing. values between ?1? (sjw = 00b) and ?4? (sjw = 11b) are adjustable. the bus line is sampled and a synchronization is performed at each falling edge of the bus signal within a bit grid. with the corresponding bit timing, it is possible to reach a multiple sampling of the bus line at the sample point by setting sam. the level determined by the can bus then corresponds to the result from the majority decision of the last three values. the sample points are at the rising edges of the external sampoint signal and twice before with a distance of one txcan system clock cycle.
chapter 7 can module (txcan) preliminary 7-18 this leads to the following restrictions: restrictions for tseg2 brp t q length (txcan clock cycles) ipt length (txcan clock cycles) tseg2 minimum length (in t q ) 01 3 3 12 3 2 >1 brp+1 3 2 restrictions for tseg1 the length of tseg1 should be equal or greater than the length of tseg2: tseg1 tseg2 restrictions for sjw the maximum length of the synchronization jump width is equal to the length of tseg2: sjw tseg2 restrictions for sam the three-time sampling is not allowed for brp<4. for brp<4 always a one-time sampling will be performed regardless of the value of sam. example: a transmission rate of 1 mbit/s will be adjusted, i.e. a bit has a length of 1 s. the clock frequency f osc is 10 mhz. the baud rate prescaler is set to ?0?. that means a bit for this data transmission rate has to be programmed with a length of 10* t q . according to the above formula, the values to be set are always by one smaller than the calculated values. e.g. brp = 1 (brp_reg = 0); tseg1 = 5 (tseg1_reg = 4), tseg2 = 4 (tseg2_reg = 3). with this setting a threefold sampling of the bus is not possible (brp<4), thus sam = 0 should be set. sjw is not allowed to be greater than tseg2, so the maximum value could be set to 4 units (sjw = 3). 7.2.8 time stamp feature there is a free-running 16-bit timer implemented in the module to get an indication of the time of reception or transmission of messages. the content of the timer is written into the time stamp register of the corresponding mailbox (tsv) when a received message has been stored or a message has been transmitted. the counter is driven from the bit clock of the can bus line. when the txcan is in configuration mode or in sleep mode, the timer will be stopped. after power-up reset the free running counter can be cleared by writing a value to the time stamp counter prescaler. the counter can be written and read by the mcu in configuration mode and in normal operation mode.
chapter 7 can module (txcan) preliminary 7-19 time stamp counter register bit 15 0 name tsc overflow of the counter can be detected by the time stamp counter overflow interrupt flag of the global interrupt flag register gif and the status flag tso in gsr. both flags can be cleared by writing a ?1? to the corresponding bit location in gif. there is a 4-bit prescaler for the time stamp counter. after power-up the time stamp counter is driven directly from the bit clock (tsp = 0). the period t tsc for the time stamp counter will be calculated with the following formula: ) 1 tsp ( t t bit tsc + ? = time stamp counter prescaler register bit 15 43210 name ? tsp to be sure, that the value of the counter will not change during the write cycle to the mailbox ram, there is a hold register implemented. the value of the counter will be copied to this register if a message has been received or transmitted successfully. the reception is successful for the receiver, if there is no error until the last but one bit of end-of-frame. the transmission is successful for the transmitter, if there is no error until the last bit of end-of-frame. (refer to the can specification 2.0b) the following figure shows the structure of the time stamp counter: prescaler register (4 bit) mcu read/write prescaler (4 bit) free running time stamp counter (16 bit) time stamp hold register (16 bit) mcu read/write transmission/reception successful can bus bit clock count-up clock hardware/software reset entering sleep mode entering configuration mode write to prescaler clear load clear hardware/software reset clear re-load value mailbox ram re-load entering sleep mode entering configuration mode write to prescaler figure 7.2.5 time stamp counter
chapter 7 can module (txcan) preliminary 7-20 the free running time stamp counter and the time stamp hold register will be cleared in the following cases: ? after reset (power-up reset or software reset) ? when the module enters configuration mode ? when the module enters sleep mode ? when a write access to the time stamp prescale register is performed 7.2.9 status registers global status register (gsr) bit 151413121110 9 8 name msginslot rm tm ? sua bit 76543210 name cce sma ?? tso bo ep ew bit name function reset value mode 15:12 msg inslot message in slot 1111 = no transmit message in slot 0000 = message 0 is in the transmission slot ... 1110 = message 14 is in the transmission slot 1111 r 11 rm receive mode 1 = txcan is receiving a message. that means txcan is not the transmitter of the message and the bus is not idle. 0 = the can module is not receiving a message 0 r 10 tm transmit mode 1 = txcan is transmitting a message. the module stays transmitter until the bus is idle or it loses arbitration. 0 = the can module is not transmitting a message 0 r 9 ? wired to zero 0r 8 sua suspend mode acknowledge 1 = txcan is in suspend mode 0 = txcan is not in suspend mode 0 r 7 cce change configuration enable 1 = the mcu is allowed to do write accesses to the configuration registers. 0 = write accesses to the configuration registers are denied. 1 r 6 sma sleep mode acknowledge 1 = txcan has entered the sleep mode. 0 = normal operation 0 r 5 ? wired to zero 0r 4 ? wired to zero 0r 3 tso time stamp overflow flag 1 = there was at least one overflow of the time stamp counter since this bit has been cleared. to clear this bit, clear the tsoif bit in the gif register. 0 = there was no overflow of the time stamp counter 0 r
chapter 7 can module (txcan) preliminary 7-21 bit name function reset value mode 2 bo bus off status 1 = there is an abnormal rate of occurrences of errors on the can bus. this condition occurs when the transmit error counter tec has reached the limit of 256. during ?bus off?, no messages can be received or transmitted. the can module will go to ?bus on? automatically after the ?bus off recovery sequence? . after entering ?bus off?, the error counters are undefined. 0 = normal operation 0 r 1 ep error passive status 1 = the can module is in the error passive mode. 0 = the can module is in the error active mode. 0 r 0 ew warning status 1 = at least one of the error counters has reached the warning level of 97. 0 = both values of the error counters are less than 97. 0 r can error counter register (cec) bit 15 8 7 0 name tec rec bit name function reset value mode 15:8 tec transmit error counter 0r 7:0 rec receive error counter 0r the can module contains two error counters: receive error counter (rec) and transmit error counter (tec). the values of both counters can be read via the mcu interface. these counters are incremented or decremented according to the can specification version 2.0b. a write access to the error counters is only possible in the test error mode (tsterr bit in mcr is set). in this mode both the tec and rec counters take over the value written to the lower byte of the register. the receive error counter is not increased after exceeding the error passive limit (128). after the correct reception of a message, the counter is set to a value between 119 and 127 (see can specification). after reaching the ?bus off? status, the error counters are undefined. if the status ?bus off? is reached, the receive error counter is incremented after 11 consecutive recessive bits on the bus. these 11 bits correspond to the gap between two telegrams on the bus. if the counter reaches the count 128, the module changes automatically to the status error active. all internal flags are reset and the error counters are deleted. the configuration registers keep the programmed values. the values of the error counters are undefined during ?bus off? status. when txcan enters configuration mode (see paragraph ?7.4.1 configuration mode?) the error counters will be cleared.
chapter 7 can module (txcan) preliminary 7-22 7.3 txcan interrupt logic the txcan has the following interrupt sources: ? transmit interrupt: a message has been transmitted successfully ? receive interrupt: a message has been received successfully ? warning level interrupt: at least one of the two error counters is greater than or equal to 97 ? error passive interrupt: txcan enters the error passive mode ? bus off interrupt: txcan enters the bus off mode ? time stamp overflow interrupt ? transmission abort interrupt ? receive message lost interrupt ? wake-up interrupt: after wake-up from sleep mode this interrupt will be generated ? remote frame pending interrupt these interrupt sources are divided in three groups: transmit interrupts, receive interrupts and global interrupts. there is one interrupt output line for each group. canrx is dedicated for receive interrupts, cantx is dedicated for transmit interrupts and canexc for the global interrupts. global interrupt flag register (gif) the interrupt flag bits will be set if the corresponding interrupt condition has occurred. if the corresponding interrupt mask bit is set in the gim register, the interrupt line irq2 will go active high. as long as an interrupt flag in the gif register is set and the corresponding mask bit is also set, the interrupt line irq2 will stay active high (?1?). bit 15 876543210 name ? rfpf wuif rmlif trmabf tsoif boif epif wlif bit name function reset value mode 15:8 ? wired to zero 0r 7 rfpf remote frame pending flag 1 = a remote frame has been received (in a receive-mailbox). this bit will not be set if the identifier of the remote frame matches to a transmit-mailbox with rfh set. 0 = no remote frame has been received. 0 r/c 6 wuif wake-up interrupt flag 1 = the module has left the sleep mode. 0 = the module is still in sleep mode or normal operation. 0 r/c 5 rmlif receive message lost interrupt flag 1 = at least for one of the mailboxes, configured as receive, an overload condition has been occurred. 0 = no message has been lost. 0 r/c 4 trmabf transmission abort flag 1 = transmission aborted interrupt-flag. at least one of the bits in the aa register is set. 0 = no transmission has been aborted. 0 r/c
chapter 7 can module (txcan) preliminary 7-23 bit name function reset value mode 3 tsoif time stamp counter overflow interrupt flag 1 = there was at least one overflow of the time stamp counter since this bit has been cleared. 0 = there was no overflow of the time stamp counter since this bit has been cleared. 0 r/c 2 boif bus off interrupt flag 1 = the can has entered the bus off mode. 0 = the can module is still in bus on mode. 0 r/c 1 epif error passive interrupt flag 1 = the can module has entered the error passive mode. 0 = the can module is still in error active mode. 0 r/c 0 wlif warning level interrupt flag 1 = at least one of the error counters has reached the warning level. 0 = none of the error counters has reached the warning level. 0 r/c note: all interrupt flags in gif are independent of the interrupt mask bits. the interrupt flags in gif can be cleared by writing a ?1? to the corresponding bit position. writing a ?0? has no effect. global interrupt mask register (gim) bit 15 876543210 name ? rfpf wuif rmlif trmabf tsoif boif epif wlif the attachment of bits in gim to the interrupt conditions is equal to that in gif. each interrupt flag bit in gif is masked by the corresponding mask bit in gim. after power-up, all bits are cleared. 7.3.1 mailbox interrupts there are two separate interrupt output lines for the mailboxes. one interrupt output for mailboxes, which are configured as transmit and one for mailboxes which are configured as receive. there are two interrupt flag registers and one interrupt mask register. one interrupt flag register is for receive mailboxes and one for transmit mailboxes. the interrupt mask register is used for transmit and receive mailboxes. mailbox interrupt mask register (mbim) the settings in mbim determine, for which mailbox the interrupt generation is enabled or disabled. if a bit in mbim is ?0?, the interrupt generation for the corresponding mailbox is disabled and if it is ?1?, the interrupt generation is enabled. reset value of mbim is 0. bit 15 0 name mbim
chapter 7 can module (txcan) preliminary 7-24 mailbox interrupt flag registers (mbtif/mbrif) bit 15 14 0 name ? mbtif bit 15 0 name mbrif there are two interrupt flag registers. one for receive mailboxes and one for transmit mailboxes. if a mailbox is configured as receive, the corresponding bits in the transmit interrupt flag register mbtif will always be read as ?0?. in mbtif, bit 15 is not implemented, because mailbox 15 is the receive- only mailbox. bit 15 of mbtif will always be read as ?0?. if a mailbox is configured as transmit, the corresponding bits in mbrif will always be read as ?0?. if a message has been received for mailbox ?n? and the mask bit is set to ?1? the corresponding interrupt flag ?n? of mbrif will be set to ?1? and the interrupt line irq0 goes active high (?1?). if a message has been transmitted from mailbox ?n? and the mask bit is set to ?1? the corresponding interrupt flag ?n? of mbtif will be set to ?1? and the interrupt line irq1 goes active high (?1?). if the mask bit in mbim is set to ?0?, the interrupt flag in mbrif or mbtif will not be set and no interrupt will be generated. the information about a successful transmission or reception could be read from the ta or rmp register respectively. the interrupt output lines irq0 and irq1 will stay at ?1? as long as one of the interrupt flags in mbrif or mbtif are ?1? respectively and the corresponding bits in mbim are set to ?1?. the interrupt flags in mbtif will be cleared by writing a ?1? from the mcu to mbtif and the interrupt flags in mbrif will be cleared by writing a ?1? to mbrif. writing a ?0? has no effect. the corresponding status flags in ta or rmp have to be cleared separately. after power-up, all interrupt flags are cleared.
chapter 7 can module (txcan) preliminary 7-25 7.4 txcan operation modes 7.4.1 configuration mode the txcan has to be initialized before activation. the bit timing parameters can only be modified when the module is in configuration mode. after reset, the configuration mode is active and the ccr bit of mcr and the cce bit of gsr are set to ?1?. the txcan could be set to normal operation mode by writing a ?0? to ccr. after leaving configuration mode, the cce bit will be set to ?0? and the power-up sequence will start. the power-up sequence consists of detecting eleven consecutive recessive bits on the can bus line. after the power-up sequence, txcan is bus on and ready for operation. to enter configuration mode from normal operation mode the change configuration request bit (ccr) has to be set to ?1?. after the txcan has entered configuration mode, the change configuration enable bit (cce) will be set to ?1?. see also the following flowchart. when the txcan enters configuration mode the error counters, the time stamp counter and the time stamp hold register will be cleared. txcan is in configuration mode: ccr=1 & cce=1 normal operation requested? set ccr to ?0? yes no switch to configuration mode from normal operation mode initialize txcan after reset set bit timing parameters in bcr1 & bcr2 cce = 0 ? yes txcan is in normal operation mode and starts power-up sequence 11 consecutive recessive bits detected? txcan is bus on and ready for operation no txcan is in normal operation mode: ccr=0 & cce=0 configuration mode requested? yes set ccr to ?1? cce = 1 ? no no yes yes no figure 7.4.1 configuration flow chart for txcan
chapter 7 can module (txcan) preliminary 7-26 7.4.2 sleep mode the sleep mode will be requested by writing a ?1? to smr (mcr register). when the module enters the sleep mode, the status bit ?sleep mode acknowledge? (sma, gsr register) will be set. during sleep mode, the internal clock of txcan is switched off. only the wake up logic will be active. the read value of the gsr will be f040h, this means, there is no message in slot and the sleep mode is active (sma is set). read accesses to all other registers will deliver the value 0000h. write accesses to all registers but the mcr will be denied. the module leaves the sleep mode if a write access to mcr has been detected or there is any bus activity detected on the can bus line (if the wake-up on bus activity is enabled). the automatic ?wake up on bus activity? can be enabled/disabled with the configuration bit wuba in mcr. if there is a write access to mcr or any activity on the can bus line (with wuba = 1), the module begins its power-up sequence. the module waits until detecting 11 consecutive recessive bits on the rx input line, afterwards it goes to bus active. the first message that initiates the bus activity cannot be received. in sleep mode, the can error counters and all ?transmission requests? (trs) and ?transmission reset requests? (trr) will be cleared. after leaving the sleep mode, smr and sma will be cleared. if the sleep mode is requested while txcan is transmitting a message, the module will not switch to the sleep mode immediately. it will continue until a successful transmission or after losing the arbitration, until ? a successful transmission or ? after loosing the arbitration a successful reception occurs.
chapter 7 can module (txcan) preliminary 7-27 7.4.3 suspend mode the suspend mode will be requested by writing a ?1? to sur (mcr register). when the module enters the suspend mode the status bit sua (gsr register) will be set to ?1?. if the can bus line is not idle, the current transmission/reception of the message will be finished before the suspend mode will be activated. in suspend mode the txcan is not active on the can bus line. that means error flags and acknowledge flags will not be sent. the error counters and the error passive flag will not be cleared in the suspend mode. if the suspend mode is requested during the bus off recovery sequence, the module stops after the bus off recovery sequence was finished. the module remains inactive until suspend mode request sur is deactivated. the suspend mode acknowledge flag is not activated, although the sur bit is ?1? and the module is inactive. to restart the module, the sur bit has to be programmed to ?0?. after leaving the bus off state or the inactive state, the module will restart its power-up sequence. txcan leaves the suspend mode by writing a ?0? to sur.
chapter 7 can module (txcan) preliminary 7-28 7.4.4 test loop back mode in this mode txcan can receive its own transmitted message and will generate its own acknowledge bit. no other can node is necessary for the operation. when the intlb bit of the mcr register is ?0?, the internal loop back is disabled. the supposition that txcan receives its own messages is that the rx and tx lines must be connected to a can bus transceiver or directly together. when the intlb bit of the mcr register is set to ?1?, the internal loop back is enabled. in this case, there is no need to connect the rx and tx lines together or to a can bus transceiver to make the txcan able to receive its own messages. the ?test loop back mode? shall only be enabled or disabled when txcan is in suspend mode. the following figure shows the set-up procedure. in ?test loop back mode? txcan can transmit a message from one mailbox and receive it in another mailbox. the set-up for the mailboxes is the same as in normal operation mode. enable/disable test loop back mode and/or test error mode no yes txcan is in normal operation mode: ccr=0 & cce=0, sur=0 & sua=0 sua = 1 ? suspend mode request: set sur to ?1? back to normal operation mode with enabled/disabled tstlb and/or tsterr: set sur to ?0? setup tstlb and/or tsterr bit: ?1? enable, ?0? disable sua = 0 ? end of setup; txcan is in normal operation mode with enabled/disabled test loop back and/or test error mode yes no figure 7.4.2 internal test flow chart
chapter 7 can module (txcan) preliminary 7-29 7.4.5 test error mode the error counters can only be written when txcan is in test error mode. the ?test error mode? shall only be enabled or disabled when txcan is in suspend mode. figure 7.4.2 shows the set-up procedure. when txcan is in ?test error mode? both error counters will be written at the same time with the same value. the maximum value that can be written into the error counters is 255. thus, the error counter value of 256 which forces txcan into bus off mode can not be written into the error counters. 7.4.6 special modes for dual channel can ? modifications due to adding a second can channel ? bits are required from the ccr register. ? singlechannelemu and cantstinternal. setting the cantstinternal to ?1? switches to an internal testmode, which is a internal connection independent from any external pins or transceivers. internal test mode txcan1 & txcan2 rxcan1 rxcan2 chip border figure 7.4.3 internal test mode ? the signal ?singlechannelemu? connects 2 channels to be able to work on only 1 transceiver. single transceiver mode txcan1 & txcan2 tx rxcan1 transceiver rx rxcan2 chip border figure 7.4.4 single transceiver mode the following table shows the bit function of canm in the chip configuration register (ccr): canm can mode 00 normal operation x1 internal test mode 10 1 transceiver - mode
chapter 7 can module (txcan) preliminary 7-30 7.5 handling of message-objects in the following sections, there are suggestions how to handle message objects. 7.5.1 receiving messages the following flowchart shows the handling of receive objects using receive interrupt irq0. setup a mailbox for message reception configure mailbox for reception: set mdn to '1' setup mailbox identifier and ide bit for standard or extended id enable mailbox: set mcn to '1' enable interrupts: set mbimn to '1' end of setup receiving messages wait for irq0 check rmp or mbrif to determine the mailbox with rmp set read out the mailbox clear rmpn, this clears also rml rmln = 1 ? read out mailbox again rmpn = 1 ? clear mbrif and return from interrupt service routine yes no no yes no yes, data has become inconsistent reading it out! new setup for the mailbox? disable mailbox: set mcn to '0' yes no special user tasks ... set lame / game of the mailbox if necessary setup lam / gam if necessary clear rmpn, this clears also rml figure 7.5.1 receiving objects using irq0 it is also possible to use polling. in this case, the ?waiting for irq0? in above flowchart must be replaced by polling rmp. enabling interrupts and clearing mbrif must be removed from the flow.
chapter 7 can module (txcan) preliminary 7-31 7.5.2 transmitting messages the following flowchart shows the handling of transmit objects by using the transmit interrupt irq1. it is also possible to use polling. in this case, the ?waiting for irq1? in the flowchart must be replaced by polling ta. enabling interrupts and clearing mbtif must be removed from the flow. setup a mailbox for message transmission configure mailbox for transmission: set mdn to ?0? disable mailbox: set mcn to ?0? setup mailbox identifier and ide bit for standard or extended id enable interrupts: set mbimn to ?1? enable mailbox: set mcn to ?1? end of setup transmitting messages new setup for the mailbox? yes update mailbox data? no write new data to the mailbox yes set transmission request: set trsn to ?1? transmission requested? no no yes no yes check ta to determine the mailbox with ta set choose transmission order: setup mtos special user tasks ... (update mailbox data?) clear ta and mbtif and return from interrupt service routine wait for irq1 figure 7.5.2 transmitting objects using irq1
chapter 7 can module (txcan) preliminary 7-32 7.5.3 remote frame handling the following flowchart shows the handling of remote frames by using the automatic reply feature. this feature is available when the rfh bit of a mailbox, which is configured for transmission, is set. to avoid data inconsistency problems when updating the mailbox data the cdr register is used. setup a mailbox for automatic reply to remote frames configure mailbox for transmission: set mdn to '0' disable mailbox: set mcn to '0' setup mailbox identifier and ide bit for standard or extended id enable mailbox: set mcn to '1' end of setup automatic reply to remote frames new setup for the mailbox? yes update mailbox data? no yes choose transmission order: setup mtos set rfh bit of the mailbox; set game if necessary setup gam if necessary change data requested: set cdrn to '1' reset cdrn: set cdrn to '0' no write new data to the mailbox figure 7.5.3 automatic reply generation for remote frames
chapter 8 parallel interface (port) preliminary 8-1 8. parallel interface (port) the port-module is a general-purpose parallel interface. the port-module contains the following features: ? 30 pins ? each pin can be configured independently as input or output ? each pin can generate an interrupt on rising or falling edge of input-signal the port module shares its pins with modules gdc, txsei and uart. bit assignment of all port registers: bit 3130292827262524 pin wired to zero pio29 pio28 pio27 pio26 pio25 pio24 access ro r/w r/w r/w r/w r/w r/w bit 2322212019181716 pin pio23 pio22 pio21 pio20 pio19 pio18 pio17 pio16 access r/w r/w r/w r/w r/w r/w r/w r/w bit 151413121110 9 8 pin pio15 pio14 pio13 pio12 pio11 pio10 pio9 pio8 access r/w r/w r/w r/w r/w r/w r/w r/w bit 76543210 pin pio7 pio6 pio5 pio4 pio3 pio2 pio1 pio0 access r/w r/w r/w r/w r/w r/w r/w r/w register function: each bit of the following registers is assigned to the corresponding pin. the table below describes the function of each register for one pin. register physical address (hex) function of one bit reset value pamux 1c03 0014 determines which module uses the pin. each bit in this register represents the setting of one pio. the upper both bits (31 and 30) are not relevant, because the TMPR3916f provides 30 pios. 0 = port module uses the pin 1 = gdc, txsei or uart (depending on the pin) further descriptions see section ?pin assignment? on next side. 0 pa 1c03 0000 this register contains data read from port pins or written to port pins. when a pin is used as input, then the corresponding bit in this register is read only. 0 pacr 1c03 0004 direction of pin 0 = input 1 = output the contents of this bit shows no effect, when pamux = 1. 0 pamsk 1c03 0010 interrupt enable 0 = disable interrupt 1 = enable interrupt whether the interrupt caused on falling or rising edge of input signal, depends on the contents of palmx register. when the pin is used by another resource or the pin is used as output, the interrupt is inhibited. 0
chapter 8 parallel interface (port) preliminary 8-2 register physical address (hex) function of one bit reset value palmx 1c03 000c controls edge detection for interrupt generation 0 = cause an interrupt on falling edge 1 = cause an interrupt on rising edge the contents of this register show no effect, if pamsk is set to 0. 0 pal 1c03 0008 interrupt flag 0 = no interrupt has occurred on pin 1 = interrupt has occurred on pin bits in this register are set, when a rising edge or a falling edge (depending on palmx setting) on the corresponding pio pin is detected and the pio was enabled for interrupts (pamsk). flags are only set if the pio is configured to be an input (pacr) and is used by the port module (pamux). each flag can be reset to 0 by writing a 0 to it. before you can reset a port-interrupt in the interrupt controller, you must reset the interrupt flag in pal register. writing 1 to this register has no effect. 0 pin assignment the pamux register in the port module and the seimux bits in the chip configuration register (ccr) determine the use of the pio pins. the following table shows the pin use and the corresponding bit settings: register settings pio0 .. pio15 pio16 .. pio29 pamux = 0 port port pamux = 1 and seimux = 0 gdc uart pamux = 1 and seimux = 1 gdc txsei example for register configuration: task solution pins 0 to 15 are used by gdc, pins 16 to 29 are used by port => pamux = 0x0000ffff pins 16 to 20 are used as outputs, pins 21 to 29 are used as inputs => pacr = 0x000f0000 following pins should cause an interrupt - a signal change from low to high on pin 24 - a signal change from high to low on pin 25 => pamsk = 0x03000000 palmx = 0x01000000
chapter 9 synchronous serial i/o (txsei) preliminary 9-1 9. synchronous serial i/o (txsei) the toshiba tx serial expansion interface is a synchronous communication unit and compatible to peripheral devices, which can be connected to an spi/sei type interface. txsei?s flexible clock control logic allows the selection of clock polarity and phase for the transfer protocol. when txsei is configured as a master, a large number of different bit rates with up to 15 mhz clock rate in the master mode can be selected. in slave mode transmissions up to 7.25 mhz are possible (assuming the TMPR3916 is operating with 60 mhz) the built-in error detection logic allows the detection of various error situations, which can occur during sei transfers. txsei also offers dma support for automated data transfers to its shift registers. by the use of dma a larger number of transfers can be scheduled at once. in particular, the usage of dma allows a more cost-effective implementation than usual large queue or buffer structures. txsei is able to perform seamless transfers of consecutive frames. alternatively, the minimum delay between two consecutive transfers is programmable for master mode. feature overview: ? phase and polarity selection ? transfer sizes of 5 to 16 bits ? dma operation: full-duplex 2 channels, half-duplex 1 channel ? built-in error detection logic ? 4 frame transmit, 4 frame receive buffers ? compatible with spi type interfaces ? master and slave operation ? 15 mbps data-rate when operated with 60 mhz clock rate. ? inter frame space delay feature ? seamless transfer of large values without delay between consecutive frames ? integrated msb / lsb first reordering ? stop and flush buffer functionality for fast event response ? programmable buffer-fill-level dependent receive / transmit interrupts
chapter 9 synchronous serial i/o (txsei) preliminary 9-2 9.1 txsei structure the following figure roughly shows the internal structure of the txsei and the connectivity to the outside of the chip via the port-multiplexer: mcu interface & configuration registers tx-fifo rx-fifo shift-register control logic p o r t c o n t r o l clk tx(sei) rx(sei) ssi io-directions dependent on mode (slave/master) port-muliplexer pios 16,17,18,19, 22 connection to internal system bus output enables chip configuration r. seimux sso figure 9.1.1 internal structure of txsei
chapter 9 synchronous serial i/o (txsei) preliminary 9-3 9.2 registers the following table shows a map of the txsei i/o-space: register (short name) physical address (hex) name function semcr 1c00 8000 master control register mode settings secr0 1c00 8004 sei control register 0 general settings secr1 1c00 8008 sei control register 1 definition of bit-rate and transfer-size sefs 1c00 800c sei inter frame space register definition of space between frames sess 1c00 8010 sei slave select space register slave select timer settings sesr 1c00 8014 sei status register status information sedr 1c00 8018 sei data register transmit and receive data sers 1c00 801c sei read start register alternative register to read received data txsei?s registers can be accessed using byte, half-word and word instructions. bits [31:16] are unused in all registers. these bits are wired to zero and read-only.
chapter 9 synchronous serial i/o (txsei) preliminary 9-4 sei master control register (semcr) bit 313029 2827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name ? bit 76543210 name opmode ? loop sestp bclr bit name function reset value r/w 31:8 ? unused 0x000000 r 7:6 opmode operation mode 00 = don?t care. writing this value to the opmode bits doesn?t change anything 01 = configuration mode: use this mode to change the settings of the bits mstr, sbos, spol and spha in secr0 and also the secr1 register. 10 = active mode: normal operation mode 11 = reserved. do not use this setting in configuration mode the sestp and loop bit and also the receive and transmit fifo will be cleared. the master and slave control modules will be kept in reset. running transfers are immediately aborted, even within the current frame. 01 r/w 5:3 ? wired to zero 000 r 2 loop loop enable: if txsei is configured as a master, this bit can be used to switch a loop-back from the tx to the rx pin for diagnostic purpose. it could be set only when the txsei is in active mode and configured as a master. setting the txsei in configuration mode will clear this bit. 0 = loop disabled, normal operation 1 = loop enabled 0 r/w 1 sestp sei stop this bit is used only during master mode. if this flag is asserted, the module will stop the transfer after the current frame has been completed. this bit could be set only when the txsei is in active mode and configured as a master. setting the txsei in configuration mode will clear this bit. 0 = normal operation 1 = module will stop after completion of the current transfer 0 r/w 0 bclr sei buffer clear this flag is used to clear the receive and transmit fifo and can only be used in master mode. the internal buffers can only be cleared, if the module is already in stop mode. in this case, the fifo logic can be reset by writing a ?1? value to this bit. the module can be taken out of the stop mode in the same access. a stop of txsei and clearance of the buffers might become necessary to guarantee a fast response to events. it is recommended to wait until the txsei module is idle (sidle=1) before activating bclr. this bit will always be read as ?0?. 0 r/w
chapter 9 synchronous serial i/o (txsei) preliminary 9-5 sei control register 0 (secr0) bit 313029 2827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name txifl rxifl silie soeie sueie stfie bit 76543210 name ? ssival ifspse mstr sbos spha spol bit name function reset value r/w 31:16 ? unused 0x0000 r 15:14 txifl transmit interrupt fill level (seitx): 00 = interrupt, if one or more tx values can be stored 01 = interrupt, if two or more tx values can be stored 10 = interrupt, if three or more tx values can be stored 11 = interrupt, if four or more tx values can be stored the first setting (txifl = 00) should be used, if the dma controller is used for transferring values for txsei transmissions. 00 r/w 13:12 rxifl receive interrupt fill level (seirx): 00 = interrupt, if one or more rx values are stored 01 = interrupt, if two or more rx values are stored 10 = interrupt, if three or more rx values are stored 11 = interrupt, if four or more rx values are stored the first setting (rxifl = 00) should be used, if the dma controller is used for transferring values from txsei receptions. 00 r/w 11 silie sei idle interrupt enable: 0 = disable sidle as an interrupt source for seiexc 1 = enable sidle as an interrupt source for seiexc 0 r/w 10 soeie sei overflow error interrupt enable: 0 = disable seoe as an interrupt source for seiexc 1 = enables seoe as an interrupt source for seiexc 0 r/w 9 sueie sei underflow error interrupt enable: 0 = disable seue as an interrupt source for seiexc 1 = enables seue as an interrupt source for seiexc 0 r/w 8 stfie sei transfer format error interrupt enable: 0 = disable setf as an interrupt source for seiexc 1 = enable setf as an interrupt source for seiexc 0 r/w 7:6 ? wired to zero 0r 5 ssival ssi valid determines if the slave select input signal is valid in master mode or not. if valid, the ssi signal will be observed in master mode to generate a transfer format error. 0 = ssi not valid in master mode 1 = ssi valid in master mode 0 r/w 4 ifspse inter frame space prescaler enable (valid only in master mode). 0 = ifs prescaler disabled 1 = ifs prescaler enabled 0 r/w 3 mstr master / slave mode select 0 = txsei is configured as slave 1 = txsei is configured as master 0 r/w
chapter 9 synchronous serial i/o (txsei) preliminary 9-6 bit name function reset value r/w 2 sbos sei bit order select 0 = lsb first operation, the least significant bit is shifted first 1 = msb first operation, the most significant bit is shifted first 0 r/w 1 spha sei phase this flag selects one of two fundamentally different transfer formats. 0 = sample on 1 st edge, shift on 2 nd edge 1 = shift on 1 st edge, sample on 2 nd edge. 0 r/w 0 spol sei polarity 0 = active high clocks selected; sclk idles low 1 = active low clocks selected; sclk idles high 0 r/w note : bits 0 to 5 of this register can only be changed in configuration mode.
chapter 9 synchronous serial i/o (txsei) preliminary 9-7 sei control register 1 (secr1) the number of bits per frame is configured using this register. this register could only be written, when the module is in configuration mode. bit 3130292827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name ser bit 76543210 name ? ssz bit name function reset value r/w 31:16 ? unused 0x0000 r 15:8 ser in master-mode, this setting controls the bit-rate for transmission. the internal clock rate generator is implemented as a down counter. the ser setting specifies the reload value for this counter. 0x01 r/w 7:5 ? wired to zero 0r 4:0 ssz transfer size 0x05 = 5 bits 0x06 = 6 bits ... ... 0x10 = 16 bits others = invalid setting note: if ssz has an invalid setting, the txsei will not work properly. 0 r/w this register can only be written, if txsei is in configuration mode. the clock-rate on the sei bus can be calculated using the following formula: 1) ( 2 + ? = ser f f system sei
chapter 9 synchronous serial i/o (txsei) preliminary 9-8 as an example, some common settings for f sys = 60 mhz are shown in the table below: ser setting sei clock rate (f sei ) sustained peak data rate half-duplex sustained peak data rate full-duplex 0x00 invalid setting invalid setting invalid setting 0x01 15 mhz 15 mbps 30 mbps 0x02 10 mhz 10 mbps 20 mbps 0x03 7.5 mhz 7.5 mbps 15 mbps 0x04 6 mhz 6 mbps 12 mbps 0x05 5 mhz 5 mbps 10 mbps 0x09 3 mhz 3 mbps 6 mbps 0x13 1.5 mhz 1.5 mbps 3 mbps 0xff 117.1875 khz 117.1875 kbps 234.375 kbps in slave mode, the setting is ignored and the clock is derived from the clock on the sei bus. note: due to the internal over-sampling, if the module is operated in slave mode, the input baud-rate must be slightly less than 1/8 of the input system clock to the module. (e.g. 60 mhz system input clock => spi slave baud rate max. 7.25 mbps) sei inter frame space register (sefs) bit 313029 2827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name ? ifs[9:8] bit 76543210 name ifs[7:0] bit name function reset value r/w 31:10 ? unused 0x000000 r 9:0 ifs inter frame space: time between two consecutive transmission frames 0 r/w this register is used to configure the amount of time, which is inserted between two consecutive frames. the time is guaranteed by an internal 10-bit down counter. the counter can be operated with or without prescaler. the ifspse bit of the secr0 register determines whether the prescaler should be used or not. when operating without prescaler, the counter runs on sei system clock. when operating with prescaler, the counter runs on 1/32 of sei system clock.
chapter 9 synchronous serial i/o (txsei) preliminary 9-9 this counter is implemented as a down counter. it is reloaded each time a transfer is completed. when another transfer is buffered, the new transfer value will be loaded to the shift buffer after the timer has expired and the transmission will start. the inter frame space timer can be disabled by setting this register to ?0? and two consecutive transfers will be sent using only the minimum amount of time required to load the buffers between consecutive frames (seamless transfer). when the counter reload value in the ifs register is ?0? the inter frame space will be one system clock cycle (16.67 ns at 60 mhz system clock). when the prescaler is not used, the inter frame space can be calculated using the following formula: sys ifs f ifs t 1 + = (range: 16.67 ns up to 17.07 s at 60 mhz system clock) when using the prescaler, the inter frame space can be calculated using the following formula: sys ifs f ifs t 1) ( 32 + = (range: 533.33 ns up to 546.13 s at 60 mhz system clock) the ifs register can be written in configuration mode and in active mode. writing to the ifs register always clears the inter frame space counter. therefore, if the shift buffer contains a message, which is waiting to be transferred, this message will be sent immediately, as soon as the ifs register is being written. this will also be the case, if the old value is rewritten to the register. if this behavior is not intended, it is possible to wait for sidle flag becoming ?0?, before writing to the register. the ifsd flag in the sesr register is asserted for the time the transfer is delayed by the ifs mechanism. sei slave select space register (sess) bit 313029 2827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name ? bit 76543210 name sess bit name function reset value r/w 31:8 ? unused 0x000000 r 7:0 sess slave select space: time between assertion of slave select signal and transmission start 0 r/w the contents of this register is the reload value of the slave select timer. write accesses to this register are possible in configuration mode and in active mode. writing to this register clears the slave select counter. this register is used to configure the amount of time, which is inserted between activating the slave select output signal in master mode and starting the transfer and between the transfer end and deactivating the slave select output signal. the time is guaranteed by an internal 8-bit down counter. the counter runs on sei
chapter 9 synchronous serial i/o (txsei) preliminary 9-10 system clock. when writing to the sess register while the shift buffer contains a message, which is waiting to be transferred, this message will be sent immediately, since the counter is cleared to ?0?. the slave select space can be calculated using the following formula: pre-transfer time: sys ssc_pre f sess t + = 2 (range: 33.33 ns up to 4.28 s at 60 mhz system clock) post-transfer time: sys ssc_post f sess t + = 3 (range: 50 ns up to 4.3 s at 60 mhz system clock) the slave select space timer can be disabled by setting this register to ?0?. the minimum time between setting the slave select signal and starting the transfer is 2 system clock cycles and the minimum time between the transfer end and deactivating the slave select signal is 3 system clock cycles. this is the case when sess is set to ?0?. the minimum time between two consecutive transfers is the sum of the minimum values of t scc_pre , t ifs and t scc_post : this is 6 system clock cycles.
chapter 9 synchronous serial i/o (txsei) preliminary 9-11 sei status register (sesr) in the sei status register, the status flags can only be read, while error flags are cleared by writing a ?1? value to the respective bit position. writing a ?0? to the error flags has no effect. bit 3130292827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name tbsi rbsi tbs rbs bit 76543210 name seoe seue setf ? ifsd sidle strdy srrdy bit name function reset value r/w 31:16 ? unused 0x0000 r 15 tbsi transmit buffer status indicator this register indicates a transmit fill level interrupt 1 r 14 rbsi receive buffer status indicator this register indicates a receive fill level interrupt 0 r 13:11 tbs transmit buffer status this register shows the status of the transmit buffer. 000 = transmit buffer empty 001 = 1 transfer stored 010 = 2 transfers stored 011 = 3 transfers stored 100 = 4 transfers stored, buffer full 000 r 10:8 rbs receive buffer status this register shows the status of the receive buffer. 000 = receive buffer empty 001 = 1 transfer stored 010 = 2 transfers stored 011 = 3 transfers stored 100 = 4 transfers stored, buffer full 000 r 7 seoe sei overflow error: this flag indicates that a value in the receive buffer has been overwritten, before it could be read. this flag always reads ?0? in master mode. in slave mode, it can be cleared by writing a ?1? value to it. this flag will be cleared by setting the module in configuration mode. 0 r/c 6 seue sei underflow error: this flag indicates that an external master tried to shift the shift register, while no new output values were specified by writing to the data register. this flag always reads ?0? in master mode. in slave mode it is cleared by writing a ?1? to it. this flag will be cleared by setting the module in configuration mode. 0 r/c 5 setf sei transfer format error: this flag indicates a violation of the transfer format. see paragraph "transfer format error". it can be cleared by writing a ?1? to it. this flag will be cleared by setting the module in configuration mode. 0 r/c 4 ? unused 0r
chapter 9 synchronous serial i/o (txsei) preliminary 9-12 bit name function reset value r/w 3 ifsd sei inter frame space delay indicator: this flag is asserted during the time, where one frame has been processed and the next frame is being delayed by the inter-frame- space timer. 0 r 2 sidle sei idle indicator: this flag is asserted, if no transfer is in progress and if the transmit buffer is empty or the stop mode (sestp=1) is activated in master mode. 1 r 1 strdy sei transmit ready: this flag indicates, that the transmit buffer is ready to receive new data. the flag is cleared, if the transmit buffer is full. 1 r 0 srrdy sei receive ready: this flag indicates, that there is valid data stored in the receive buffer. this flag is cleared when emptying the receive buffer while reading sedr or sers register 0 r sei data register (sedr) bit 3130292827262524 name ? bit 2322212019181716 name ? bit 151413121110 9 8 name dr[15:8] bit 7 0 name dr[7:0] bit name function reset value r/w 31:16 ? unused 0x0000 r 15:0 dr data register for transmission and reception 0r/w
chapter 9 synchronous serial i/o (txsei) preliminary 9-13 receive buffer transmit buffer mcu bus in clk out shift buffer sedr read write sers other registers read & start figure 9.2.1 data paths in txsei the actual shift register is buffered for both transmission and reception. the receive and transmit buffers are implemented as fifo with a depth of four frames. a write to sedr register writes the value to the transmit buffer. from there, the data will be transferred to the shift register as soon as txsei is ready for the next transfer. reading the sedr register delivers the current value from the receive fifo and increments the receive fifo pointer, if there are other values stored in the fifo. the shift-buffer is the physical register, which is used during sei transfers for shifting in/out the data. besides sedr, the sers register offers a second method to access the transfer values. data in both the sedr and the sers register are stored right aligned. e.g.: for eight bit transfers, only the lower eight bits of the sedr register are used. for 16 bit transfers the lower 16 bits of sedr are used. when reading this register, unused bits, except the upper 16 bits, are undefined. the upper 16 bits always read to zero.
chapter 9 synchronous serial i/o (txsei) preliminary 9-14 sei read start register (sers) bit 313029 2827262524 name ? bit 2322212019181716 name ? bit 15 8 name rs[15:8] bit 7 0 name rs[7:0] bit name function reset value r/w 31:16 ? unused 0x0000 r 15:0 rs read start: reads received data and immediately starts a transmission. 0 r/w the sers register offers a second method to fetch values from the receive buffer. reading this register returns the value from the receive buffer. just like a read from the data register would. in contrast to reading the data register, the read from the sers register counts for two register accesses: a read from the data register and a write of value 0xffff to the data register. therefore, in master mode a read access to this register will not only return the value from the receive buffer, but will also start a new transfer. in slave mode, the received data will be delivered and the data 0xffff will be written to the data register, but the transfer will start when the master activates the slave select signal and switches on the sclk clock. in order not to have tx buffer underruns the user should initially write some data via the sedr into the tx buffer. the register is useful during half-duplex operations, where data is read from spi, while ?don?t care data? is shifted out. it can be specified as dma source address to save a valuable dma channel during half-duplex transfers. the register can only be read. do not write to this register.
chapter 9 synchronous serial i/o (txsei) preliminary 9-15 9.3 txsei operations there are five signals associated with sei transfers multiplexed on the pio pins. the use of each signal depends on the mode (master/slave) of the sei device. because the sei signals are on a shared pin it is necessary to deactivate pios 16, 17, 18, 19 and 22 by writing a zero to bits 16, 17, 18, 19 and 22 in the pmux register. furthermore the selection whether txsei or uart0 functionality is mapped to the corresponding pins has to be done via the chip configuration register (ccr). a typical configuration consists out of one master device, which controls several slave devices. only the master and one slave device are active at once. the master selects one slave for communication using the port pins to select each slave separately. only the selected slave enables its port driver for the rx signal. txsei offers a dedicated slave select input, which allows it to act on busses with multiple master devices. the dedicated slave select input guarantees a fast response to master?s device selection on the bus. pio16/ clk(sei) /clk(sio0) pin: in master mode the clk pin is used as an output, in slave mode it functions as input. when txsei is configured as master, the clk signal is derived from the internal txsei clock generator depending on the sei polarity and clock rate settings. when the master initiates a transfer, a programmable number of 5 to 16 clock cycles are automatically generated on the clk pin. when txsei is configured as a slave, the clk pin synchronizes data output and input to and from the external master. in both the master and slave sei device, data is shifted on one edge of the clk signal and is sampled on the opposite edge where data is stable. the edge polarity is determined by the sei transfer protocol. pio18/ tx(sei) /tx(sio0) and pio17/ rx(sei) /rx(sio1) the rx and tx data pins are used for receiving and transmitting serial data. when the sei is configured as a master, rx is the data input line, and tx is the master data output line. when the sei is configured as a slave, these pins reverse roles. pio19/ ssi(sei) /clk(sio1) pin the slave select input port is used in slave mode. the slave select input signal is active low. if txsei?s slave select input is inactive, txsei will not follow the transmissions on the sei bus. if the slave select signal goes inactive during a running transfer and there are still other bits of the current transfer expected to receive, a transfer format error will be signaled. the current value of the shift buffer will be transferred to the receive buffer despite of this error. when txsei is configured to be the master and the ssi pin is asserted a transmission error will be recognized. this function can be disabled with the ssival bit in the secr0 register. pio22/ sso(sei) /rts(sio1) pin pio22 is the dedicated slave select output signal and is asserted during transfer in master mode by the txsei device. in the case that the protocol of the connected device expects that the ss signal idles low for longer than 16 bits this signal must be generated using the port module.
chapter 9 synchronous serial i/o (txsei) preliminary 9-16 9.3.1 txsei transfer format during an sei transfer, data is simultaneously transmitted (shifted out serially) and received serially (shifted in serially). the serial clock synchronizes shifting and sampling of the information on the two serial data lines. the transfer format depends on the settings of the spha and spol registers in the secr0 register. spha switches between two fundamentally different transfer protocols, which are described below. 9.3.1.1 spha equals 0 format sck (spol = 0) sck (spol = 1) tx rx ss cycle # srrdy n= 5,6,...,16 1 2 3 4 n-3 n-2 n-1 n sample point figure 9.3.1 protocol timing for spha=0 in this transfer format, the bit value is captured on the first clock edge. this will be on a rising edge when spol equals zero and on a falling edge when spol equals one. the levels on the tx and rx signals change with the second clock edge on sck. this clock edge will be a falling edge when spol equals zero and a rising edge, when spol equals one. with spol equal to zero, the shift clock will idle low. with spol equals 1 it will idle high. in master mode, when a transfer is initiated by writing a new value to the sedr register the new data is placed on the tx signal for half a clock cycle before the shift clock starts to operate. after the last shift cycle, the strdy and srrdy flags will be asserted. in this format the ss signal has to be deasserted and reasserted between each successive frame. if the txsei is configured as a slave, ss has to be deasserted at least for the period of one txsei bit time (at least 8 system clocks).
chapter 9 synchronous serial i/o (txsei) preliminary 9-17 9.3.1.2 spha equals 1 format clk (spol = 0) clk (spol = 1) tx rx ss cycle # n=5,6,...,16 1 2 3 4 n-3 n-2 n-1 n sample point srrdy figure 9.3.2 protocol timing for spha=1 in this transfer format, the first bit is shifted in on the second clock edge. this will be on a falling edge when spol equals 0 and on a rising edge when spol equals 1. if spol equals 0, the shift clock will idle low; with spol equals 1 it will idle high. in master mode, when a transfer is initiated by writing a new value to the sedr register the new data is placed on the tx signal with the first edge of the shift clock. 9.3.1.3 inter-frame space delay mechanism due to its dma support and its buffered shift register, txsei is able to sustain high data rates, with only a minimum amount of space between two consecutive frames. however, between consecutive transfers it still has to be ensured that the slave device can keep up with the transfer rate of the sei master. if txsei is configured as a master, the slave device typically has to write new values to its transmit buffer, before the next transfer can be started. to allow this, usually a minimum inter-frame space is specified considering interrupt response and data fetch time of the slave device. txsei eases the implementation of this inter-frame space by offering an automated mechanism to guarantee inter-frame delays between consecutive frames. the inter-frame space counter is implemented as a 10 bit down counter. the counter is reloaded with the value from the sefs register after each transfer. the next transfer will not start before the ifs counter reaches a value of zero. the internal ifs counter is reset every time the sefs register is written. therefore, if the module is in the inter-frame space the next transfer will start immediately, if the register is written, even if the same value is rewritten to the register.
chapter 9 synchronous serial i/o (txsei) preliminary 9-18 the following figure shows the function of the inter-frame space timer: transfer 1 wait ifs transfer 2 sck transfer ifscounter storerxval loadtxval seifs seifs-1 0 1 2 figure 9.3.3 waveform while using inter-frame space timer 9.3.2 txsei buffer structure txsei has both a transmit and a receive buffer. the buffers are implemented as fifo and are able to store four frames each (one frame has a 16-bit length). when a new txsei transfer is started by writing the data register, the transfer value is first stored in txsei?s transmit buffer. from there the value will be fetched by the shift register immediately, if the module is idle or after the currently running transfer has completed. a receive value from the shift register is stored in the receive buffer every time a transfer completes. txsei is able to generate interrupts depending on the fill-level of these buffers. therefore, it is possible to refill the buffers with several values within one interrupt service routine, if desired. 9.3.2.1 txsei system errors txsei is able to detect the following system errors during transfer: 9.3.2.2 seoe ? overflow error an overflow error will be generated, when the receive buffer is completely filled, while a new value has been completely received on the sei bus. in this case the data of the last transfer in the receive buffer is overwritten with the new value and the seoe flag in the sesr register is asserted. the seoe register gives the programmer an indication, that data consistency during the transfer was lost. 9.3.2.3 seue ? underflow error an underflow error is generated, if the module is in slave mode and the bus master performs a shift, when no output value has been specified by writing to the data register.
chapter 9 synchronous serial i/o (txsei) preliminary 9-19 9.3.2.4 setf ? transfer format error this error is generated, if the transfer format is violated. there are two different scenarios, in which a transfer format error could occur. in slave mode, a transfer format error will be signaled, if: ? the slave select pin is used for txsei purpose (configured in the port register) and ? txsei is in the middle of a transfer and ? the number of bits received yet is smaller than the number specified in the ssz (secr1) register and if the slave select signal is set inactive at this point. it signals the user, that the master ended the transfer before the expected end of the transfer. a possible cause for this error could be different transfer length settings for master and slave devices. the partially received value will not be stored in the receive buffer since it is not complete. in master mode, a transfer format error will be signaled, if: ? the slave select input signal is enabled in master mode (ssival bit in secr0 register) and ? both the master bit is set to one (mstr bit in secr0) and the system is in active mode (opmode=?10? in semcr) and ? the slave select signal is asserted. 9.4 interrupts txsei connects to three interrupt signals. ? seiexc: system error flags seoe, seue, setf, sidle (separately maskable) ? seirx rx buffer fill level interrupt, flag rbsi (not maskable) ? seitx tx buffer fill level interrupt, flag tbsi (not maskable) interrupt seiexc is used for error detection purpose (seoe, seue, setf) and idle state interrupt (sidle). the interrupts seirx and seitx are used to fetch and setup new data in an interrupt service routine for transferring data. all the interrupts will occur one system clock cycle later than the internal flags, which are visible in the status register.
chapter 9 synchronous serial i/o (txsei) preliminary 9-20
chapter 10 asynchronous serial interface (uart) preliminary 10-1 10. asynchronous serial interface (uart) the asynchronous serial interface (uart) has the following features: ? four channels ? full-duplex transfer ? baud rate generator ? modem flow control (rts/cts), available on channels 1 and 2 only ? transmit and receive fifo, each of size 2 entries ? multi controller system support (master/slave * operation capable) 10.1 operations on serial interface 10.1.1 outline the uart is used to convert parallel data, retrieved from memory, to a serial stream with control and error detection bits. the same applies for data receive: only that a serial stream of data is converted to parallel by means of a shift register and then put into a fifo. to retrieve data from memory or store data into memory one of the following policies is available: ? polling the interrupt status register ? by serving an interrupt ? by dma transfer. the rate at which data is transferred (baud rate) can be programmed in the baud rate control register. care has to be taken in the configuration of the TMPR3916 to enable the i/os of the uart. * please read carefully the documentation if the device has to be used for slave operation, since the TMPR3916 does not have open drain output pins.
chapter 10 asynchronous serial interface (uart) preliminary 10-2 baud rate generator externalclock systemclock serial in / parallel out (sipo) and rx fifo systembusdata(31:0) datatosystembus(7:0) status register tx fifo and parallel in / serial out (piso) serialdatain rts_n cts_n serialdataout serialclockout datafromsystembus(7:0) tx fifo status rx fifo status & rx error flags txdmareq_n rxdmareq_n control bus txdmaack_n rxdmaack_n systembuscontrol figure 10.1.1 uart block diagram 10.1.2 data format there are several data formats, which can be applied for serial i/o, these are summarized here: data length 7 ? 8 ? 9 bits (9-bit data is practicable for a multi controller system) stop bit 1 ? 2 bits parity bit provided/not provided parity system even/odd start bit 1-bit fixed data format msb/lsb first (switchable by register settings) please note that sending a parity bit is not allowed for address transmission in a multi-controller system, figure 10.1.2 and figure 10.1.3 show examples for these data formats:
chapter 10 asynchronous serial interface (uart) preliminary 10-3 8-bit data start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 b i t7 sto p stop start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 b i t7 sto p start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 sto p start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 sto p stop start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 sto p pari ty sto p start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 sto p pari ty 7-bit data 1 2 3 4 5 6 7 8 9 10 11 12 start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 b i t7 sto p pari ty sto p start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 b i t7 sto p pari ty 1 2 3 4 5 6 7 8 9 10 11 12 figure 10.1.2 8 bit and 7 bit data format for single controller mode, data formats are shown for 1 and 2 stop bits, with and without parity stop start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 b i t7 sto p ?v?t ? a start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 b i t7 sto p ?v?t ? a 1 2 3 4 5 6 7 8 9 10 11 12 7-bit data multi control system 8-bit data multi control system start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 sto p ?v?t ? a stop start bi t0 b i t1 b i t5 bi t4 bi t3 bi t2 b i t6 sto p ?v?t ? a 1 2 3 4 5 6 7 8 9 10 11 12 wub=wake up bi t 1: a ddress ( id ) f ra m e 0: data f ra m e figure 10.1.3 multi controller mode transmission, 7 and 8 bit data formats are shown with 1 or 2 stop bits, parity check is not available in multi controller mode
chapter 10 asynchronous serial interface (uart) preliminary 10-4 10.1.3 serial clock generator the data rate of serial transmissions depends on the serial clock. to generate the serial clock it is possible to use either an external clock or the system clock of the device. please note that once an external clock is connected to the device?s i/o pin the user must use this clock, otherwise a conflict will occur. once that the clock source is fixed, this is used to generate the serial clock by means of a prescaler (optional) and a baud rate divisor. figure 10.1.4 shows a block diagram of the serial clock generator: t0 t2 t4 t6 prescale select divider baud rate divider value selector selector external clock clock select 2 baud rate g enerator prescaler system clock selector clock select 1 sioclk 1/16 outsel figure 10.1.4 serial clock generator structure the clock select 1 and 2 control lines are bits 6 and 5 respectively of the line control register and allow the user to choose between an internal or external clock, and if the baud rate generator has to be bypassed. the output clock ? if the brg is bypassed ? can be of the same frequency as the input clock or divided by 16, depending on the value of outsel (line control register). the sioclk is not used as system clock for fifos etc, but to synchronize operations. the sioclk is output as serial clock out. the outsel bit will affect the frequency of the serial clock out but not the baud rate of the uart. the baud rate generator creates the transmit/receive clock, which regulates the transfer rate for the serial interface. the baud rate can be calculated by the following formula: 16 1) generator rate baud of (divisor prescaler frequency input rate baud + = the input clock (either system or external clock) may be prescaled by the values shown in the sibgr registers and then divided according to the brd field of the same register. pay attention to the fact that the clock is actually divided by a value of (brd+1). the brd is an 8-bit register, so the divider ranges from 1 to 256. table 10.1.1 shows the output frequency of the baud rate generator (sioclk), depending on the baud rate divisor and the prescaler:
chapter 10 asynchronous serial interface (uart) preliminary 10-5 desired baud rate baud rate input prescaler baud rate divisor actual baud rate 9600 60 mhz ? (000) 194 (0xc2) 9615 57600 60 mhz ? (000) 32 (0x20) 56818 115200 60 mhz ? (000) 15 (0x0f) 117187 table 10.1.1 baud rate register settings for common baud rates other baud rates may be easily calculated. when choosing the value of the prescaler and the baud rate divisor we recommend that the actual baud rate should not differ more than 4.0% from the nominal value. this is because a certain drift is allowed but if the 4.0% figure is exceeded then the correct transmission of a frame is not guaranteed anymore. 10.1.4 transmitter control once that the parameters have been set, writing data into the transmit fifo is sufficient for transmission. during transmission also the parity bit will be calculated and added to the data stream if the option has been enabled. the data transmission rate will be the one set in the baud rate register. make sure that both receiver and transmitter have the same settings for baud rate, data bits, parity, and stop bits. the transmitter shift register is an 8-bit shift register, that gets its data from the transmitter fifo. bit 0 of the shift register will be sent first. 10.1.5 receiver control after that the receiver is enabled, the controller will be looking for the start bit on the serial input line (rx). a ?0? on serial input only will be recognized as start bit, if a ?1? was detected in the bit before. when the receive control detects a start bit, the receiving operation will start. the output of the baud rate generator (sioclk) is 16 times the frequency of the data transfer rate on serial interface. the serial data input (rx) will be sampled on 7 th , 8 th and 9 th clock of sioclk. a majority logic determines the input value. the receiver shift register consists of an 8-bit shift register. at the end of a transmission, bit 0 of the shift register contains the bit which has been received first. 10.1.6 host interface the data transfer to the transmitter fifo can be handled via interrupt processing or via dma transfer. if the transmitter fifo has as many free entries as set in the transmit dma interrupt trigger level (tdil in fifo control register), an interrupt or dma request is generated. afterwards the dma controller or the software fetches data from memory and writes it to the transmitter fifo. the data transfer from the receiver fifo can be handled via polling, interrupt processing or via dma transfer. if the receiver fifo has as much free space as set in the receive dma interrupt trigger level (rdil in fifo control register), an interrupt or dma request is generated. afterwards the dma controller or the software fetches data from the receive fifo and writes it to memory.
chapter 10 asynchronous serial interface (uart) preliminary 10-6 the following settings of tdr, rdr, tir and rir of interrupt control register (sidicr) are allowed: tdr rdr tir rir transmit receive 0 0 0 0 tdis polling rdis polling 0 0 0 1 tdis polling interrupt 0 0 1 0 interrupt rdis polling 0 0 1 1 interrupt interrupt 0 1 0 0 tdis polling dma 0 1 1 0 interrupt dma 1 0 0 0 dma rdis polling 1001dma interrupt 1100dma dma table 10.1.2 dma/interrupt control register settings for host interface operation 10.1.7 flow control transmission enable can be set either ? via software control by a transmit serial data request of the mpu (tsdr). ? via hardware control. when the transmit enable becomes inactive, the transmission will be suspended after the completion of the current frame transmission. reception is enabled either ? via rts software control of the mpu (rtssc) or ? via hardware control. for hardware control, the flow control offers the possibility of a dma transfer or an interrupt request. this choice can be made by configuring the interrupt control register (sidicr). remember that rts/cts flow control has to be enabled by flow control register (siflcr). during transfers, the receiver can ask for a temporary suspension by setting to 1 the rts signal. the transmission is resumed by setting to 0 the rts signal when the receiver is ready to accept new data. frame by frame data transfer is available by setting the transmitter to hardware control (tes=1) and the receiver rtstr to 1 (handshaking).
chapter 10 asynchronous serial interface (uart) preliminary 10-7 10.1.8 parity control during transmission , parity information is generated when the data is written to the transmitter shift register. the information is stored ? in bit 7 of the transmitter shift register for 7-bit data length or ? in twub of the line control register for 8-bit data length. during reception , the parity check is executed when the data is written from receiver shift register to the receiver buffer. a parity error occurs when a difference between received and calculated parity bit is found. the check information is stored ? in bit 7 of the read buffer for 7-bit data length or ? in rwub of the line control register for 8-bit data length. 10.1.9 interrupts the uart can send three interrupt signals to the interrupt controller of the TMPR3916: ? transmit interrupt ? receive interrupt ? exception interrupt a brief explanation of the meaning of each of these interrupts now follows, for further details refer to the registers section of the document. it is possible to mask the interrupts by programming the sidicr register. the cause of the interrupt, however, is latched and available for polling. transmit interrupt a transmit interrupt may occur when: ? there is free space in the tx fifo, hence new data may be written in the fifo. receive interrupt a receive interrupt may occur when: ? there is valid data in the rx fifo, which has not been retrieved yet. ? there is a time out on the receiver and the time out is mapped on the rx interrupt (programming rir bit of interrupt control register) ? there is an error (parity, frame or overrun) detected in the rx fifo. exception interrupt a status interrupt may occur when: ? there is a break in the uart transfer (see section ?10.1.11 breaks?). ? all data in transmit fifo has been sent. ? there is free space in tx fifo. ? a cts active has been detected by the transmitter. ? there is an overrun error. ? there is a frame error. ? there is a parity error.
chapter 10 asynchronous serial interface (uart) preliminary 10-8 10.1.10 error flags the following error flags can be risen: overrun error occurs when there is an overflow of the transmit or of the receive buffer. parity error occurs when the received parity bit and the calculated parity information are not the same. frame error occurs when 0 is detected at the stop bit position during receive. 10.1.11 breaks a break is detected by the receiver when all bits in a frame are 0 and the stop bit is also 0. when a break is detected the received data will not be stored and the uart will assert an interrupt to signal the break condition. to transmit a break, the tbrk bit of the flow control register must be set to 1. to resume normal operation the tbrk bit must be set to 0 again. 10.1.12 receiver time out a receiver time out occurs when the receiver fifo has at least 1 entry stored and an equivalent of a 2-byte receive time is elapsed from the previous reception. that sets the receiver time out bit (tout) in the dma/interrupt status register(sidisr). please note that if all data has been fetched from the fifo, the time out will not be set! it is recommended not to use the tout bit for flow control of the receiver. 10.1.13 handling of received data and receiver fifo status bits the following status information is stored in the receiver fifo along with the received data: ? uart receiver break (ubrk) ? uart available status (uvalid) ? uart frame error (ufer) ? uart parity error (uper) ? uart overrun error (uoer) the software can read the status in the dma/interrupt status register (sidisr). the status of this register is updated always after data has been read from the fifo: if there are 2 entries in the fifo, and the second one contains a parity error, this will be signaled in the sidisr only after the first entry has been read. data that has been received without errors can be read from the receiver fifo. a receive interrupt request will indicate the presence of new entries in receiver fifo, if this is enabled. errors during reception will be indicated by an exception interrupt request. only data that has been received without errors is transferable via dma. when an error (ufer, uper, uoer) or a receive time-out (tout) occurs, the receive error is notified and the received data transfer request is not asserted.
chapter 10 asynchronous serial interface (uart) preliminary 10-9 10.1.14 multi controller systems when umode in the line control register (silcr) is 0x2 or 0x3, the uart changes into the multi controller system mode. in a multi controller system, the master controller sends data to the selected slave controllers. the slaves will be selected by sending an address id before sending the data. non- selected slave controllers will ignore the data. setting the wub of the transmit frame to 1 indicates the transmission of an address id. data frames, instead, will have the wub set to 0. it is up to the software to compare the addresses and eventually enable the reception of data frames. protocol of multi controller system: (1) master and slave controllers must have the umode field 10 or 11 in the line control register to operate in multi controller mode. (2) software sets the rwub in the line control register to 1 ? for each slave controller ? to be ready to receive the address id frame from the master controller. (3) software sets the wub of the transmit frame to 1 (line control register wub=1) ? in the master controller ? to send the slave controller address id (7- or 8-bit length). (4) an interrupt is generated in a slave controller when rwub in line control register is 1 and wub of the received data frame is 1 (receive data is an address frame). the software compares its address id with the received address id and sets rwub to 0 when both match. the last operation enables the selected slave to receive data frames. (5) then software must set the wub of the line control register to 0 to enable the transmission of data frames for the master controller. if this operation is not performed the wub in the transmitted frames will be 1, and the slaves will understand the incoming frames as address frames. when the selected slave controller (i.e. the controller whose address matched with the one sent by the master) receives data, an interrupt is generated. a non selected slave controller will have the rwub still set to 1, incoming data frames will be ignored. the slave controllers can send data only to the master controller. an example of the multi controller system configuration is shown in figure 10.1.5 master sout sin tx rx rx tx sin sout slave#1 rx tx sin sout slave#2 rx tx sin sout slave#3 figure 10.1.5 example configuration for multi controller system important: the TMPR3916 does not have open drain capability on its output pins. a configuration as the one depicted in figure 10.1.5 is possible only if external logic is added on the board.
chapter 10 asynchronous serial interface (uart) preliminary 10-10 10.2 registers 10.2.1 overview register (short name) physical address (hex) name function silcr 1c00 0000 line control register specify data format sidicr 1c00 0004 dma/interrupt control register controls settings about interrupt and dma requests sidisr 1c00 0008 dma/interrupt status register shows status information about interrupt and dma requests siscisr 1c00 000c status change register shows status information of uart transfer sifcr 1c00 0010 fifo control register controls settings of transmit/ receive fifo siflcr 1c00 0014 flow control register controls running transmission sibgr 1c00 0018 baud rate control register contains baud rate settings sitfifo 1c00 001c transmitter fifo register transmit data sirfifo 1c00 0020 receiver fifo register received data this table includes the addresses of uart channel 0. channel 1 uses the addresses 1c00 0040 to 1c00 0060. channel 2 uses the addresses 1c00 0080 to 1c00 00a0. channel 3 uses the addresses 1c00 00c0 to 1c00 00e0.
chapter 10 asynchronous serial interface (uart) preliminary 10-11 10.2.2 line control register (silcr) bit 31 16 name ? bit 151413121110 98 name rwub twub ?? outsel irda lsbf bit 76543210 name ? scs ueps upen usbl umode bit name function reset value r/w 31:16 ? wired to zero 0r 15 rwub wake up bit for receive 0 = the uart does not wait for a wake-up-bit 1 = the uart is looking for a wake-up-bit used only in multi controller mode. 0 r/w 14 twub wake up bit for transmit 0 = next frame contains data (wake-up-bit = 0) 1 = next frame contains address (wake-up-bit = 1) the contents of this bit make only sense in multi controller mode. 1 r/w 13 ? not used / always write to ?0? 0r/w 12:11 ? wired to zero 00 r 10 outsel clock output select 0 = clock frequency is the same as in baud rate register (sibgr) specified 1 = clock frequency is 16 times the value specified in baud rate register (sibgr) 0 r/w 9 irda irda clock 0 = no output of irda clock 1 = output of irda clock it has no meaning when outsel = 1. 0 r/w 8 lsbf lsb first 0 = reads or sends the msb first 1 = reads or sends the lsb first 0 r/w 7 ? wired to zero 0r 6:5 scs sio clock select 00 = internal system clock 01 = baud rate generator provided with internal clock 10 = external clock 11 = baud rate generator provided with external clock 10 r/w 4 ueps uart parity select 0 = odd parity 1 = even parity 0 r/w 3 upen uart parity enable 0 = disable parity check 1 = enable parity check the bit should be 0 in the multi controller system mode (umode = 10, 11). 0 r/w 2 usbl uart stop bit length 0 = 1 bit 1 = 2 bit 0 r/w
chapter 10 asynchronous serial interface (uart) preliminary 10-12 bit name function reset value r/w 1:0 umode uart mode for the sio mode setting. 00 = 8-bit data length 01 = 7-bit data length 10 = multi controller 8-bit data length 11 = multi controller 7-bit data length 00 r/w the reception of a 1-bit stop while in a 2-bit stop length setting does not generate a frame error. when an external clock is connected to the serial clock in pin of the TMPR3916, bit 6 of the silcr must be set to 1 to avoid conflicts. it is not possible to connect an external clock and decide to use the system clock for uart operation. the outsel bit will have effect only on the frequency of the serial clock out. the baud rate of the uart will not depend on the settings of the outsel bit. the wake up bit for receive has to be set to 1 if the receiver has to be enabled for receiving an address frame prior to the data frames. the wake up bit for transmit has to be set to 1 if an address frame is being sent prior to sending data frames (an address frame may be followed by several data frames to the same receiver). obviously these two bits make sense only in multi controller mode. in a point-to-point transmission there?s no need to address the receiver. 10.2.3 dma/interrupt control register (sidicr) bit 31 16 name ? bit 151413121110 9 8 name tdr rdr tir rir spir ctsac ? bit 76543210 name ? sioe sicts sibrk sitr sias siub bit name function reset value r/w 31:16 ? wired to zero 0r 15 tdr transmit dma request 0 = no dma request when free space in transmit fifo 1 = dma request when free space in transmit fifo 0 r/w 14 rdr receive dma request 0 = no dma request when data in receive fifo 1 = dma request when data in receive fifo 0 r/w 13 tir transmit interrupt request 0 = no interrupt when free space in transmit fifo 1 = send siotx interrupt when free space in transmit fifo 0 r/w 12 rir receive interrupt request 0 = no interrupt when error or time out occurs 1 = when error or time-out occurs send ? siorx interrupt, when rdr=0, ? sioexc interrupt, when rdr=1 0 r/w
chapter 10 asynchronous serial interface (uart) preliminary 10-13 bit name function reset value r/w 11 spir special interrupt request 0 = no interrupt when errors occur 1 = send sioexc interrupt, when errors occur 0 r/w 10:9 ctsac ctss status active condition sets condition of cts. 00 = disable cts 01 = cts terminal rising edge 10 = cts terminal falling edge 11 = both edges 0 r/w 8:6 ? wired to zero 0r 5 sioe special interrupt on overrun error 0 = no actions on overrun error 1 = when an overrun error occurs, send sioexc interrupt and set stis bit in interrupt status register (sidisr) 0 r/w 4 sicts special interrupt on receive of cts 0 = no actions on cts 1 = when receiving cts, send sioexc interrupt and set stis bit in interrupt status register (sidisr) 0 r/w 3 sibrk special interrupt on break of uart transfer 0 = no actions on break 1 = when a break occurs, send sioexc interrupt and set stis bit in interrupt status register (sidisr) this bit must have the same value of siub 0 r/w 2 sitr special interrupt on free space in transmit fifo (rbrkd) 0 = no actions on free space in transmit fifo 1 = when free space is detected, send sioexc interrupt and set stis bit in interrupt status register (sidisr) 0 r/w 1 sias special interrupt, when all data sent 0 = no actions, when all data sent 1 = when all data sent, transmit sioexc interrupt and set stis bit in interrupt status register (sidisr) 0 r/w 0 siub special interrupt on break of uart transfer (ubrkd) 0 = no actions on break 1 = when a break occurs, send sioexc interrupt and set stis bit in interrupt status register (sidisr) this bit must have the same value of sibrk 0 r/w the siub and sibrk bits have the same behavior for the exception interrupt, since there is only one break flag in the dma/interrupt status register (sidisr). however the sibrk masks the uart being in break status, the siub masks the detection of a break. obviously as soon as a break is detected (if any of the two is unmasked) the uart will send an interrupt request. to know if a break has already occurred or is still active refer to the status change register (siscir). setting these two bits to 1 or 0 will not affect the behavior of the status change register.
chapter 10 asynchronous serial interface (uart) preliminary 10-14 10.2.4 dma/interrupt status register bit 31 16 name ? bit 151413121110 9 8 name ubrk uvalid ufer uper uoer eri tout tdis bit 76543210 name rdis stis ? rfdn bit name function reset value r/w 31:16 ? wired to zero 0r 15 ubrk break this bit will be set to 1, when break is detected 0 r 14 uvalid no data available this bit will be set to 1, when the receiver fifo contains no data. 1 r 13 ufer frame error this bit will be set to 1, when an error occurred during transfer of the current frame. 0 r 12 uper parity error this bit will be set to 1, when a parity error has been detected. 0 r 11 uoer over run error this bit will be set to 1, when an overrun error has occurred. 0 r 10 eri error interrupt this bit will be set to 1, when a frame error, parity error or overrun error has occurred. writing 0 to this bit clears it. writing 1 does not change contents of this bit. 0 r/w 9 tout receive time out this bit will be set to 1 immediately after a receive time out occurs. writing 0 to this bit clears it. writing 1 does not change contents of this bit. 0 r/w 8 tdis transmit dma/interrupt status this bit will be set to 1, when there is free space in the transmit fifo. 1 r/w 7 rdis receive dma/interrupt status this bit will be set to 1, when there are valid data in the receive fifo. 0 r/w 6 stis status interrupt status this bit will be set to 1, when the status, selected in stir of interrupt control register (sidice), has changed. 0 r/w 5 ? wired to zero 0r 4:0 rfdn receive fifo data number status indicating the number of received data frames stored in the receiver fifo (0 to 2 entries). 00000 r/w ubrk, uper and uoer show the status of the upper fifo entry. after reading the next data entry, the uart will update the status information in ubrk, uper and uoer. that is the reason, why the software must read status information before reading the data.
chapter 10 asynchronous serial interface (uart) preliminary 10-15 10.2.5 status change register (siscisr) bit 31 8 name ? bit 76543210 name ? oers ctss rbrkd trdy txals ubrkd bit name function reset value r/w 31:6 ? wired to zero 0r 5 oers overrun error this bit will be set to 1, when an overrun error occurs. cleared by writing 0 0 r/w 4 ctss cts terminal indicates the cts terminal status. 0 = cts is deasserted 1 = cts is asserted 0 r 3 rbrkd receive break this bit will be set to 1, when the uart is in break status. 0 r 2 trdy tx ready set to 1 when the transmitter fifo has free space at least for one entry of data. 1 r 1 txals tx all set to 1 when transmitter fifo and transmitter shift register are empty. 1 r 0 ubrkd uart break detect set to 1 immediately when a break is detected. cleared by writing 0. 0 r/w ubrkd will be set to 1 as soon as a break is detected, it will remain 1 until it is explicitly cleared by the software. rbrkd, instead, will be 1 only for the duration of the break.
chapter 10 asynchronous serial interface (uart) preliminary 10-16 10.2.6 fifo control register (sifcr) bit 31 16 name ? bit 151413121110 9 8 name swrst ? rdil bit 76543210 name rdil ? tdil tfrst rfrst frstew bit name function reset value r/w 31:16 ? wired to zero 0r 15 swrst software reset 0 = normal operation 1 = softreset of uart this software reset lasts for 4 clock cycles. the channel will not react to any requests during this time period. warning: while using instruction cache of tx39 the following problem occurs: as it takes about 5 clock cycles to activate software reset this might affect the next write action to a register of the channel being reset. solution: insert other instructions between resetting command and next write command of the same channel. 0 w 14:9 ? wired to zero 0r 8:7 rdil receive dma/interrupt trigger level these bits determine at which fill level of the receive fifo the uart sends an interrupt or dma request. 00 = if 1 byte in receive fifo make a request 01 = if 2 bytes in receive fifo make a request others = invalid setting 00 r/w 6:5 ? wired to zero 0r 4:3 tdil transmit dma/interrupt trigger level these bits determine at which fill level of the transmit fifo the uart sends an interrupt or dma request. 00 = if 1 byte in transmit fifo make a request 01 = if 2 bytes in transmit fifo make a request others = invalid setting 00 r/w 2 tfrst transmit fifo reset 0 = normal operation 1 = reset of transmit fifo (only when frstew = 1) 0 r/w 1 rfrst receive fifo reset 0 = normal operation 1 = reset of receive fifo (only when frdtew = 1) 0 r/w 0 frstew fifo reset enable 0 = resets of receive and transmit fifo are inhibited 1 = resets of receive and transmit fifo are possible 0 r/w to properly reset the receiver or the transmitter fifo, bit frstew has to be set to 1 together and at the same time in which tfrst or rfrst are set to 1. e.g.: to reset the receiver fifo value 0x00000003 must be written. this operation will reset the receiver fifo until either rfrst or frstew are set to 0 again by writing in the sifcr register to perform a software reset, the value of the frstew bit is meaningless.
chapter 10 asynchronous serial interface (uart) preliminary 10-17 10.2.7 flow control register (siflcr) bit 31 16 name ? bit 151413121110 9 8 name ? rcs trs ? rtssc rsdr bit 76543210 name tsdr ? rtstl tbrk bit name function reset value r/w 31:13 ? wired to zero 0r 12 rcs rts control select selects the method to control the rts terminal. 0 = software control 1 = software or hardware control 0 r/w 11 trs tx request select selects the transmit request. 0 = control by transmit serial data request (tsdr). 1 = control by transmit request command or the cts terminal (hardware control) 0 r/w 10 ? wired to zero 0r 9 rtssc rts software control determines the output of the rts terminal. 0 = sets the rts terminal to 0 1 = sets the rts terminal to 1 0 r/w 8 rsdr receive serial data request 0 = received data will stored 1 = received data will not be written into fifo 1 r/w 7 tsdr transmit serial data request 0 = transmission runs 1 = halts transmission. a running transmission will be finished. 1 r/w 6:2 ? wired to zero 0r 1 rtstl rts trigger level sets the rts hardware control assert level at the number of receive data entries in the receiver fifo. possible settings: 01, 10 1 r/w 0 tbrk transmitter break 0 = normal operation 1 = transmit a break 0 r/w when the rsdr bit is set to 1, received data will be ignored: it will not be written into fifo. frame, overrun and parity errors will not be generated.
chapter 10 asynchronous serial interface (uart) preliminary 10-18 10.2.8 baud rate control register (sibgr) bit 31 16 name ? bit 15 1110987 0 name ? bclk brd bit name function reset value r/w 31:11 ? wired to zero 0r 10:8 bclk baud rate generator clock specifies the prescaler for the input clock of baud rate generator. 000 = 1/2 system frequency 001 = 1/8 system frequency 010 = 1/32 system frequency 011 = 1/128 system frequency 1xx = system frequency (prescaler bypass) 011 r/w 7:0 brd baud rate divisor set the baud rate divisor. 0xff r/w 10.2.9 transmitter fifo register (sitfifo) bit 31 8 7 0 name ? txd bit name function reset value r/w 31:8 ? wired to zero 0r 7:0 txd transmit data data written to this register are carried to transmit fifo. note: the bits are write-only. 0 w 10.2.10 receiver fifo register (sirfifo) bit 31 8 7 0 name ? rxd bit name function reset value r/w 31:8 ? wired to zero 0r 7:0 rxd receive data read this register to get next data item from the receiver fifo. 0 r the receiver fifo register can only be read by a 32-bit-word access.
chapter 10 asynchronous serial interface (uart) preliminary 10-19 10.3 timings receive operation: (7, 8-bit data length) 1 789 16 bit0 bit7 16 789 sioclk sin valid bit0 valid bit7 10 11 10 11 789 10 11 parit y bit sintreq * sintreq * 1 16 789 10 11 1 16 stop bit data sintreq * if framing error occur if parit y error occur dma/interrupt status reg. =1 overrun error dma/interrupt status reg. =1 dma/interrupt status reg. =1 figure 10.3.1 receiving 7 or 8 bit data receive operation: (7, 8-bit length multi controller system; rwub=1 for id receive standby) 1 789 16 bit0 bit7 16 789 sioclk sin valid bit0 valid bit7 10 11 10 11 789 10 11 wake up bit =1 spintreq * spintreq * 1 16 789 10 11 1 16 stop bit data spintreq * if framing error occur overrun error dma/interrupt status reg. =1 dma/interrupt status reg. =1 figure 10.3.2 receiving 7 or 8 bit id in multi controller environment receive operation: (7, 8-bit length multi controller system; rwub=0 for data receive standby) 1 789 16 bit0 bit7 16 789 sioclk sin valid bit0 valid bit7 10 11 10 11 789 10 11 wake up bit = 0 spintreq * spintreq * 1 16 789 10 11 1 16 sto p bit data spintreq * if framing error occur overrun error dma/interrupt status reg. =1 dma/interrupt status reg. =1 figure 10.3.3 receiving 7 or 8 bit data in multi controller environment
chapter 10 asynchronous serial interface (uart) preliminary 10-20 receive operation: (7, 8-bit length multi controller system; rwub=1 for data skip) 1 789 16 bit0 bit7 16 789 sioclk sin valid bit0 valid bit7 10 11 10 11 789 10 11 wake up bit = 0 spintreq * spintreq * 1 16 789 10 11 1 16 stop bit data spintreq * if framing error occur over run error dma/interrupt status reg. =1 dma/interrupt status reg. =1 figure 10.3.4 receiving 7 or 8 bit data skip multi controller environment transmit operation 11 16 bit0 bit7 16 sioclk sout trans. fifo to trans. shift reg. shift-out timing 16 1 start bit 16 11 16 1 16 (wake up bit) stop bit 16 bit n parity bit figure 10.3.5 transmitting 8 bit data transmit halt timing by cts* 11 16 bit0 16 sioclk sout trans. fifo to trans. shift reg. shift-out timing 16 start bit 16 11 16 bit n cts * stop bit trans. halt trans,start figure 10.3.6 transmitting halt command when cts becomes 1 during data transmission, the data transfer halts after completing the current data transmission. despite the halt, the next data is stored in the transmitter shift register. the transmission is restarted at the first shift out pulse after cts becomes low.
chapter 10 asynchronous serial interface (uart) preliminary 10-21 10.4 flow charts in this paragraph some flow charts are presented, which should help the user to perform basic operations on the uart. in these examples an upper layer which involves a software protocol is used: the transmitter will send as first data frame a ?block length? which will be used by the receiver to determine the number of incoming data frames. so if n data frames have to be transmitted, the actual length of the transmission will be of n+1 since the protocol uses the first frame as a control frame. the user may choose to implement or not such a protocol, the reason for using it here is to give an easy example on how to operate the uart. it is not recommended to use the timeout error in the receiver to determine the end of a transmission: if the fifo is empty the error will not occur. this bit is not suitable for flow control. 10.4.1 transmitter programming figure 10.4.1 shows a basic example of transmission operation. the hardware rts/cts flow control is used, the other parameters refer to: ? 8 bit data length ? 1 stop bit ? even parity ? msb first ? software operates in polling mode on the tx fifo
chapter 10 asynchronous serial interface (uart) preliminary 10-22 start TMPR3916 ccr register & mux configuration reset uart: (sifcr) swrst = 1 tfrst = 1 frstew = 1 line control register: lsbf = 0 ueps = 1 upen = 1 (sets msb first, 8 bit tx, etc) interrupt control register: ctsac = 01 sets cts active status to rising edge stop uart reset (sifcr) tfrst = 0 frstew = 0 flow control register trs = 1 rsdr = 0 tsdr = 0 enables cts hardware, storing of received data. block length > 0 ? no yes check txals in siscisr (tx fifo empty) 0 transmission ends store 2 entries in tx fifo set block length block length > 1 ? 1 yes store 1 entry in tx fifo no store block length in tx fifo block length = block length - 2 block length = block length - 1 figure 10.4.1 example flow for a transmit operation. the operations written with the courier font are not to be performed on the uart, but may involve TMPR3916 programming or only software operations. 10.4.2 receiver programming in case of a reception operation, the flow of a simple driver could be like the one depicted in figure 10.4.2. here the parameters used to program the uart are: ? 8 bit data length ? 1 stop bit ? even parity ? msb first ? rts hardware flow control ? software operates in polling mode
chapter 10 asynchronous serial interface (uart) preliminary 10-23 0 0 start TMPR3916 ccr register & mux configuration reset uart: (sifcr) swrst = 1 rfrst = 1 frstew = 1 line control register: lsbf = 0 ueps = 1 upen = 1 (sets msb first, 8 bit tx, etc) stop uart reset (sifcr) rfrst = 0 frstew = 0 flow control register rcs = 1 rsdr = 0 rtstl = 0001 enables rts hardware, storing of received data, sets rts trigger level to 1 reception ends check rfdn (number of entries in rx fifo) in interrupt status register 1 no errors check interrupt register for frame, parity, overrun or time out errors retrieve one entry from rx fifo error check rfdn (number of entries in rx fifo) in the interrupt status register 1 errors block length = block length - 1 block length > 0 ? yes no retrieve the first entry from the rx fifo store the fifo entry as block length in a register of TMPR3916f figure 10.4.2 example flow for a receive operation. the operations written with the courier font are not to be performed on the uart, but may involve TMPR3916 programming or only software operations.
chapter 10 asynchronous serial interface (uart) preliminary 10-24
chapter 11 electrical characteristics preliminary 11-1 11. electrical characteristics 11.1 dc characteristics of TMPR3916 parameter symbol min typ max unit supply voltage v dd 3.0 3.3 3.6 v operating temperature ta ? 40 ? 85 c storage temperature t stg ? 40 ? 125 c soldering temperature (time: 10 s) t solder ?? 260 c power dissipation (normal mode) p d ?? 1200 mw operating current normal mode standby mode i dd i dds 150 ? ? ? 333 500 ma a low level input voltage v il ? 0.3 ? 0.2vdd v high level input voltage 5 v tolerant others v ih 0.7vdd 0.7vdd ? ? 5.8 vdd+0.3 v v low level input current standard input buffer input buffer with pull-up (1) i il ? 10 ? 200 ? ? ? 10 ? 10 a a high level input current i ih ? 10 ? 10 a low level output voltage v ol ?? 0.4 v high level output voltage v oh 2.4 ? ? v output current 4 ma buffer (2) 8 ma buffer (3) i ol 4 8 ? ? ? ? ma ma (1) the following inputs have an integrated pull-up resistance: vsync, hsync, dotclk, dreq0, reset, ext0, ext1, ext2, nmi, dbge, dreset, buserr, ack, rxcan0, rxcan1, pio16, pio18, pio19, pio21, pio22, pio23, pio25, pio26, pio27, pio29 (2) the following outputs are 4ma buffer outputs: txcan1, txcan0, hdisp, vsync, hsync, dotclk, pio29, pio28, pio27, pio26, pio25, pio24, pio23, pio22, pio21, pio20, pio19, pio18, pio17, pio16, pio15, pio14, pio13, pio12, pio11, pio10, pio9, pio8, pio7, pio6, pio5, pio4, pio3, pio2, pio1, pio0 (3) the following outputs are 8ma buffer outputs: a26, a25, a24, a23, a22, a21, a20, a19, a18, a17, a16, a15, a14, a13, a12, a11, a10, a9, a8, a7, a6, a5, a4, a3, a2, rd, wr, last, bstart, burst, cke, we, be3, be2, be1, be0, dreq0, dack0, sysclk, ras, cas, cs5, cs4, cs3, cs2, cs1, cs0, dclk, pcst2, pcst1, pcst0, sdao, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22, d23, d24, d25, d26, d27, d28, d29, d30, d31
chapter 11 electrical characteristics preliminary 11-2 11.2 power up sequence t resethold vdd plloff * pllcircuit output clken output clock external reset a 26 value(1) internal reset t staosc t stapll t a26sample note 1: a26 stabilization determined by rc delay consider load on a26 for selection of pull-up/pull-down value t resetintdelay figure 11.2.1 waveform for TMPR3916?s power-up sequence parameter symbol min typ max unit oscillator starting time (2) t staosc ? 500 ? s pll starting time t stapll ?? 500 s reset hold time t resethold 25 ? ? cycles (1) a26 sample time t a26sample ?? 4cycles (1) initial delay after reset t resetintdelay 1000 ? 1050 cycles (1) (1) cycle means one systemcycle of TMPR3916. (at 60 mhz one cycle is 16,7 ns) (2) determined by external oscillator.
chapter 11 electrical characteristics preliminary 11-3 11.3 crystal oscillator an example of application circuit: TMPR3916 xtal1 xtal2 r fb xtal r d c out1 c in c out2 l out figure 11.3.1 connecting crystal oscillator parameter symbol min typ max unit oscillator frequency (1) f osc 6.5 7.5 8.5 mhz system clock frequency f sys ?? 60.0 mhz oscillator starting time (2) t staosc ? 500 ? s phase-locked-loop multiplier (f sys = n * f osc ) n ? 8 ? (1) restricted by the pll input frequency capture range. (2) determined by external oscillator.
chapter 11 electrical characteristics preliminary 11-4 11.4 view dac dc characteristics: parameter symbol min typ max unit resolution (each dac) ? 8 (1) ? bits accuracy (each dac) integral linearity error differential linearity error i l d l ? ? ? ? ? ? lsb lsb analog output current white level white level from black level black level blank level ? ? ? ? 19.05 17.61 1.44 0.00 ? ? ? ? ma ma ma ma lsb size ? 69.06 ? a voltage-reference input current ? 1.66 ? ma stand-by current ? 0.00 ? ma (1) only upper six bits are used in TMPR3916, lower two bits are wired to zero ac characteristics: parameter symbol min typ max unit clock rate f max ?? 175 mhz clock cycle time t ck 5.72 ? ? ns analog output full scale delay t od ? 1.8 ? ns full scale rise/fall time (10% to 90%) t or ? 0.78 ? ns glitch impulse ? 32.5 ? pv - sec power supply current i aa ?? 70 ma connectivity of viewdac: TMPR3916 0.1 d v c c d g n d a g n d 4 a g n d 3 a g n d 2 v r e f v b s f s a d j r o u t a v c c 3 g o u t a v c c 2 b o u t a v c c 1 a g n d 1 3.3 v rgb output 10 10 0.1 0.1 0.1 0.1 745 37.5 37.5 37.5 1.235 v * to reduce the noise, please place ceramic capacitors of 0.1uf between dvcc/dgnd, avcc3/agnd3, avcc2/agnd2 and avcc1/agnd1 as close as possible to the pads * use seperate ground lines/planes for the digital and the analog ground in order to avoid analog ground level shift as a result of the current through the dgnd terminal 3.3 k figure 11.4.1 applying external connectivity for digital/analog converter
chapter 11 electrical characteristics preliminary 11-5 11.5 standby mode timing to resume the pll circuit operations, set the plloff* pin to ?high? and the clken pin to high. at that time, a period of 500 s is required for the pll circuit oscillation to stabilize. the following diagram shows the corresponding timing: sysclk clken min 500 s plloff * pll oscillation pllstop figure 11.5.1 standby mode waveform 11.6 boot device by using the following application circuit, the user can choose between 16 bit and 32 bit boot device. TMPR3916 a26 memory device r = 47 k ? vcc vss jumper jumper connected to ... vcc => boot by 16 bit device vss => boot by 32 bit device figure 11.6.1 applying external boot mode selection circuit
chapter 11 electrical characteristics preliminary 11-6 11.7 sdram timing designing the sdram interface the following guidelines should be considered: ? sdram signals should be routed using a comparable wire-length for each interface signal ? capacitive load mismatches between different interface signals should be avoided for the following electrical specification of the TMPR3916f external bus interface, balanced loads and equal wiring lengths of the interface signals are assumed. a[31:0] be[3:0] we ras, cas sysclk d out [31:0] write access read access a[31:0] be[3:0] we ras,cas sysclk d in [31:0] t dos sample point t doh t dis t dih t cr t cf figure 11.7.1 sdram interface timing diagram parameter symbol min typ max unit output setup time t dos 4.5 ? ? ns output hold time t doh 2.5 ? ? ns input setup time t dis 3,5 ? ? ns input hold time t dih 1.5 ? ? ns clock rise time t cr ?? 4.0 ns clock fall time t cf ?? 4.0 ns load on interface signals c if ?? 30 pf
chapter 11 electrical characteristics preliminary 11-7 11.8 rom / sram timing sysclk cs a be rd d* t aod t dis t dih t aoh sample point cycle is determined by rwt setting * driven by the external memory device t aoh figure 11.8.1 rom/flash/sram interface timing diagram (read) sysclk cs a be wr d* t aod t aoh write hold time is determined by rwt setting * driven by TMPR3916f t aoh t dod t doh t acw figure 11.8.2 rom/flash/sram interface timing diagram (write) parameter symbol min typ max unit address, control output drive time t aod ?? 12 ns data output drive time t dod ?? 12,5 ns address, control output hold time t aoh 2,0 ? ? ns data output hold time t doh 2,0 ? ? ns address to cs or wr 1 t acw 0 ? ? ns data input setup time t dis 3 ? ? ns data input hold time t dih 2 ? ? ns load on interface signals c if ?? 30 pf 1 assumes balanced loads on wr, cs and address pins.
chapter 11 electrical characteristics preliminary 11-8 11.9 external slave write timing: a[31:0] sysclk t eos1 cs be[3:0] bstart last wr ack t eos2 d out [31:0] t eoh1 t eis2 t eih2 t eoh2 figure 11.9.1 timing diagram for write access to external slave initiated by TMPR3916 parameter symbol min typ max unit output setup time of cs, a, be, d t eos1 4.0 ? ? ns output hold time of cs, a, be, d t eoh1 2.0 ? ? ns output setup time of bstart, last, wr, dack t eos2 4.0 ? ? ns output hold time of bstart, last, wr, dack t eoh2 2.0 ? ? ns input setup time of ack t eis2 6.0 ? ? ns input hold time of ack t eih2 2.0 ? ? ns load on interface signals c if ?? 30 pf
chapter 11 electrical characteristics preliminary 11-9 read timing: a[31:0] sysclk d in [31:0] t eis1 cs be[3:0] bstart last wr ack sample point t eih1 figure 11.9.2 timing diagram for read access to external slave initiated by TMPR3916 parameter symbol min typ max unit input setup time of d[31:0] t eis1 4.0 ? ? ns input hold time of d[31:0] t eih1 2.0 ? ? ns load on interface signals c if ?? 30 pf dma timing: dreq sysclk t mis dack t mih t mos t moh figure 11.9.3 timing diagram for dma request parameter symbol min typ max unit output setup time of dack t mos 5.0 ? ? ns output hold time of dack t moh 2.0 ? ? ns input setup time of dreq t mis 6.0 ? ? ns input hold time of dreq t mih 2.0 ? ? ns load on interface signals c if ?? 30 pf
chapter 11 electrical characteristics preliminary 11-10 11.10 external interrupts and nmi the external interrupts (ext0, ext1, ext2) and the nmi can be applied asynchronous to the system clock. all interrupt inputs are low active. parameter symbol min typ max unit length of asynchronous interrupt t irql 2 ? ? cycles (1) (1) cycle means one system cycle of TMPR3916 (at 60 mhz one cycle is 16.67 ns) 11.11 general purpose i/o (port module) the inputs to the general purpose i/os can be applied asynchronous to the system clock. parameter symbol min typ max unit length of input signal t gpl 10 ? ? cycles (1) sample frequency f gps ? 7.5 (2) ? mhz (1) cycle means one system cycle of TMPR3916 (at 60 mhz one cycle is 16.67 ns) (2) at 60 mhz system clock
chapter 11 electrical characteristics preliminary 11-11 11.12 txsei timing t ssol sclk (spol=0) sclk (spol=1) tx (output) rx (input) ss (output) valid valid valid valid valid valid t cr t cf 1/f sei t mis t mih t mod t moh figure 11.12.1 timing diagram for txsei timing (master, sphase = 0) sclk (spol=0) sclk (spol=1) tx (output) rx (input) ss (output) valid valid valid valid valid valid t cr 1/f sei t cf t mis t mih t mod t moh t ssol figure 11.12.2 timing diagram for txsei timing (master, sphase = 1)
chapter 11 electrical characteristics preliminary 11-12 parameter symbol min typ max unit sei clock frequency f sei ?? 15 (1) mhz sei clock rise time t cr ?? 12 ns sei clock fall time t cf ?? 12 ns master data in setup time t mis 20 ? ? ns master data in hold time t mih 5 ? ? ns master data out drive time t mod ?? 20 ns master data out hold time t moh 0 ? ? ns slave select output lead time t ssol 1 ? ? cyc (2) load on sei interface signals c if ?? 50 pf (1) at 60 mhz system clock. in general: ? of the system clock. (2) system cycles, means 16.67 ns at 60 mhz clock frequency. sclk (spol=0) sclk (spol=1) rx (output) tx (input) ss (output) valid valid valid valid valid 1/f seis t sis t sih t sod t soh t ctdt t ssdv valid figure 11.12.3 timing diagram for txsei timing (slave, sphase = 0)
chapter 11 electrical characteristics preliminary 11-13 sclk (spol=0) sclk (spol=1) rx (output) tx (input) ss (output) invalid valid valid 1/f seis t sod t soh t ctdt t ssdv valid t sis t sih valid figure 11.12.4 timing diagram for txsei timing (slave, sphase = 1) parameter symbol min typ max unit slave mode sei clock frequency f seis ?? 7.25 (1) mhz clock to data valid time t sod ?? 20 ns clock to data invalid time t soh 0 ? ? ns slave data in setup time t sis 20 ? ? ns slave data in hold time t sih 5 ? ? ns slave select to data valid time t ssdv ?? 50 ns slave select to clock t sstc 3/f sys ? ? ns consecutive transfer delay time (2) t ctdt 1/f seis ? ? ns load on sei interface signals c if ?? 50 pf (1) at 60 mhz system clock. in general: 1/8 of the system clock frequency. (2) f sys refers to the TMPR3916 system clock (usually 60 mhz). (3) for sphase = 1 the slave does not require to be deselected between consecutive transfers.
chapter 11 electrical characteristics preliminary 11-14
chapter 12 package preliminary 12-1 12. package 12.1 pin assignment 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 clken plloff an39vdd vdd3 xtal2 xtal1 vss3 an39gnd vss vdd vss2 d8 d7 d6 d5 d4 vdd vss d3 d2 d1 d0 pio0 pio1 pio2 pio3 pio4 vdd3 vss3 pio5 pio6 vss pio7 pio8 pio9 vss2 vdd pio10 pio11 pio12 pio13 pio14 vss pio15 pio16 pio17 pio18 pio19 pio20 pio21 vdd3 vss3 1 57 d9 vdd 104 158 d10 vss 103 159 d11 pio22 102 160 d12 pio23 101 161 d13 pio24 100 162 d14 pio25 99 163 vss pio26 98 164 d15 pio27 97 165 d16 vss2 96 166 d17 vdd 9 5 167 d18 pio28 94 168 vdd pio29 93 169 vss2 dotclk 92 1 7 0 d19 hsync 91 171 d20 vsync 90 1 7 2 d21 hdisp 89 1 7 3 vss3 vss 88 174 vdd3 dreset 87 1 75 d22 sdi 86 1 7 6 vss dbge 8 5 177 d23 sdao 84 1 7 8 d24 pcst0 83 1 7 9 d25 pcst1 82 180 d26 pcst2 81 181 d27 dclk 80 182 d28 vdd3 7 9 183 d29 vss3 78 184 vdd vss 77 18 5 d30 rxcan0 7 6 186 vss txcan0 75 18 7 d31 rxcan1 7 4 188 a2 txcan1 7 3 189 a3 vdd 72 190 a4 vss 7 1 191 a5 vss2 7 0 192 a6 dgnd 69 193 a7 dvcc 68 194 a8 avcc1 6 7 195 vss3 agnd3 66 196 vdd3 avcc2 6 5 19 7 vss vref 64 198 a9 vbs 63 199 vss2 agnd2 62 200 vdd fsadj 61 201 a10 agnd1 60 202 a11 bout 5 9 203 a12 gout 5 8 204 a13 rout 57 20 5 a14 agnd5 5 6 206 a15 agnd4 55 207 a16 avcc3 54 208 a17 not connected 53 a18 a19 vss2 vdd a20 a21 a22 a23 a24 a25 a26 rd wr vss vdd vdd3 vss3 last bstart burst cke we be3 be2 be1 be0 reset vss vdd vss2 buserr dreq0 dack0 ext2 ext1 ext0 ack nmi sysclk ras cas cs5 vss2 vdd vss cs4 cs3 cs2 cs1 cs0 vdd test0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 figure 12.1.1 TMPR3916f?s pin assignment TMPR3916f top view
chapter 12 package preliminary 12-2 the following table divides the different pins into functional groups. TMPR3916f provides pins, which have a shared functionality. therefore you can find one and the same pin up to three times in different groups (like pio18/tx(sei)/tx(sio0) pin). classification pin name pin no. i/o level active a[26] / boot16 11 i/o ? a[25:20] 10 ~ 5 o ? a[19:18] 2 ~ 1 o ? a[17:10] 208 ~ 201 o ? a[9] 198 o ? a[8:2] 194 ~ 188 o ? be[3:0] * 23 ~ 26 o low d[31] 187 i/o ? d[30] 185 i/o ? d[29:23] 183 ~ 177 i/o ? d[22] 175 i/o ? d[21:19] 172 ~170 i/o ? d[18:15] 167 ~ 164 i/o ? d[14:9] 162 ~ 157 i/o ? d[8:4] 145 ~ 141 i/o ? d[3:0] 138 ~ 135 i/o ? control signals rd * 12 o low wr * 13 o low last * 18 o low bstart * 19 o low burst * 20 o low buserr * 31 i low ack * 37 i low reset * 27 i low clock signals xtal1 151 i ? xtal2 152 o ? sysclk 39 o ? plloff * 155 i low core clken 156 i high cs1 * 49 o low cs0 * 50 o low ras * 40 o low cas * 41 o low cke 21 o high sdram we * 22 o low cs5 * 42 o low cs4 * 46 o low cs3 * 47 o low memc cs2 * 48 o low hsync * 91 i/o low vsync * /csync * 90 i/o low hdisp 89 o high dotclk 92 i/o ? pio0/digital b out[0] 134 i/o ? pio1/digital b out[1] 133 i/o ? pio2/digital b out[2] 132 i/o ? pio3/digital b out[3] 131 i/o ? gdc pio4/digital b out[4] 130 i/o ?
chapter 12 package preliminary 12-3 classification pin name pin no. i/o level active pio5/digital b out[5] 127 i/o ? pio6/digital g out[1] 126 i/o ? pio7/digital g out[2] 124 i/o ? pio8/digital g out[3] 123 i/o ? pio9/digital g out[4] 122 i/o ? pio10/digital g out[5] 119 i/o ? pio11/digital r out[1] 118 i/o ? pio12/digital r out[2] 117 i/o ? pio13/digital r out[3] 116 i/o ? pio14/digital r out[4] 115 i/o ? pio15/digital r out[5] 113 i/o ? rout 57 a. o ? gout 58 a. o ? bout 59 a. o ? vbs 63 ? vref 64 ? gdc fsadj 61 ? dreq0 * 32 i low dmac dack0 * 33 o low tx(can1) 73 o ? rx(can1) 74 i ? tx(can0) 75 o ? txcan rx(can0) 76 i ? pio18/tx(sei)/tx(sio0) 110 i/o ? pio17/rx(sei)/rx(sio0) 111 i/o ? pio16/clk(sei)/clk(sio0) 112 i/o ? pio19/ssi * (sei)/clk(sio1) 109 i/o low txsei pio22/sso * (sei)/rts * (sio1) 102 i/o low pio29/tx(sio3) 93 i/o ? pio28/rx(sio3) 94 i/o ? pio27/cts * (sio2) 97 i/o low pio26/rts * (sio2) 98 i/o low pio25/tx(sio2) 99 i/o ? pio24/rx(sio2) 100 i/o ? pio23/cts * (sio1) 101 i/o low pio22/sso * (sei)/rts * (sio1) 102 i/o low pio21/tx(sio1) 107 i/o ? pio20/rx(sio1) 108 i/o ? pio19/ssi * (sei)/clk(sio1) 109 i/o ? pio18/tx(sei)/tx(sio0) 110 i/o ? pio17/rx(sei)/rx(sio0) 111 i/o ? uart pio16/clk(sei)/clk(sio0) 112 i/o ? pio29/tx(sio3) 93 i/o ? pio28/rx(sio3) 94 i/o ? pio27/cts * (sio2) 97 i/o ? pio26/rts * (sio2) 98 i/o ? pio25/tx(sio2) 99 i/o ? pio24/rx(sio2) 100 i/o ? pio23/cts * (sio1) 101 i/o ? pio22/sso * (sei)/rts * (sio1) 102 i/o ? pio21/tx(sio1) 107 i/o ? pio20/rx(sio1) 108 i/o ? pio19/ssi * (sei)/clk(sio1) 109 i/o ? port pio18/tx(sei)/tx(sio0) 110 i/o ?
chapter 12 package preliminary 12-4 classification pin name pin no. i/o level active pio17/rx(sei)/rx(sio0) 111 i/o ? pio16/clk(sei)/clk(sio0) 112 i/o ? pio15/digital r out [5] 113 i/o ? pio14/digital r out [4] 115 i/o ? pio13/digital r out [3] 116 i/o ? pio12/digital r out [2] 117 i/o ? pio11/digital r out [1] 118 i/o ? pio10/digital g out [5] 119 i/o ? pio9/digital g out [4] 122 i/o ? pio8/digital g out [3] 123 i/o ? pio7/digital g out [2] 124 i/o ? pio6/digital g out [1] 126 i/o ? pio5/digital b out [5] 127 i/o ? pio4/digital b out [4] 130 i/o ? pio3/digital b out [3] 131 i/o ? pio2/digital b out [2] 132 i/o ? pio1/digital b out [1] 133 i/o ? port pio0/ digital b out [0] 134 i/o ? ext2 * 34 i low ext1 * 35 i low ext0 * 36 i low intc nmi * 38 i low vdd 4, 15, 29, 44, 51, 72, 95, 104, 120, 140, 147, 168, 184, 200 ? vdd3 16, 79, 106, 129, 153, 174, 196 ? vss 14, 28, 45, 71, 77, 88, 103, 114, 125, 139, 148, 163, 176, 186, 197 ? vss2 3, 30, 43, 70, 96, 121, 146, 169, 199 ? vss3 17, 78, 105,128, 150, 173, 195 ? avcc1 67 avcc2 65 avcc3 54 dvcc 68 dgnd 69 an39vdd 154 ? an39gnd 149 ? agnd1 60 ? agnd2 62 ? agnd3 66 ? agnd4 55 ? power agnd5 56 ? dclk 80 o ? pcst2 81 o ? pcst1 82 o ? pcst0 83 o ? sdao/tpc 84 o ? dbge * 85 i low sdi/dint * 86 i low dsu dreset * 87 i low test test0 52 i high not connected n/c (1) 53 (1) recommendation: connect unconnected pins to ground.
chapter 12 package preliminary 12-5 12.2 pin functions classification pin name pin function a[26:2] address signal output pins. the a26 pin has a special functionality. the level supplied to this pin is latched with the rising edge of the reset * signal. the level determines whether to boot from a device with 16-bit or 32-bit width. supplying ?high? lets the TMPR3916f boot from a 16-bit device. be[3:0] * byte enable output pins the byte enable signals are used to select the bytes within the word, which are accessed by the current write or read access. the following list shows the relationship between byte enable signals and the valid bytes on the data bus. be * [0] low => d[7:0] valid be * [1] low => d[15:8] valid be * [2] low => d[23:16] valid be * [3] low => d[31:24] valid d[31:0] data input/output pins rd * the rd * signal is asserted during a read access to the external bus interface. wr * the wr * signal is asserted during a write access to the external bus interface. last * the last * signal is asserted if the final data of the current bus operation is read or written. bstart * the bstart * signal is asserted for one cycle at the beginning of an external bus interface access. burst * the burst * signal indicates that the current access is a burst access. buserr * bus error input pin. if an error occurs during the current transaction the external device has the opportunity to signal this event to the TMPR3916f by asserting the buserr * signal. thereupon the TMPR3916f will finish the access and will create a bus-error exception. ack * acknowledge signal input pin. during a read access the external device acknowledges data- transfers of a transaction by asserting the ack * signal. the data on the external bus interface will be sampled on the rising edge of system clock. during a write access the external device signals the TMPR3916f that the data was captured by asserting the ack * signal. the TMPR3916f will complete the transaction. core reset * if a low level is applied to the reset * signal the chip will go into the reset state. xtal1 input pin for the crystal. xtal2 feedback output pin for the crystal. sysclk output of system clock, which is the reference clock for bus operation. plloff * master clock switching pin. inputting a ?high? signal to this pin uses the built-in pll circuit as the master clock. master clock frequency is eight times the external clock. inputting a low signal to this pin halts the built-in pll circuit oscillation and uses the external clock as master clock. clock generator clken the clock enable pin enables supply of crystal input to internal pll. this signal is high active. cs1 * chip select 1 * signal for the external sdram device. cs0 * chip select 0 * signal for the external sdram device. ras * cas * we * the three signals row access strobe (ras * ), column access strobe (cas * ) and write enable (we * ) are used to supply the sdram with commands. sdram cke the clock enable pin is an output to sdram used for power saving purposes.
chapter 12 package preliminary 12-6 classification pin name pin function cs5 * the chip select signal 5 will be asserted if an access to the address range specified in the rccr5 register will take place. cs4 * the chip select signal 4 will be asserted if an access to the address range specified in the rccr4 register will take place. cs3 * the chip select signal 3 will be asserted if an access to the address range specified in the rccr3 register will take place. mc cs2 * the chip select signal 2 will be asserted if an access to the address range specified in the rccr2 register will take place. hsync * horizontal sync signal input/output pin. vsync * /csync * vertical sync signal input/output pin or the composite sync signal output pin. the composite sync signal is the logic ex-nor (exclusive nor) operation on signals hsync * and vsync * hdisp while the viewable area of the current line is output by the gdc the hdisp is set to logic one. data can be read with one cycle latency to this signal. dotclk dot clock input/output pin. the dot clock is the reference clock for the display. this clock is either input to or output by the TMPR3916f. pio15/digital r out[5] pio14/digital r out[4] pio13/digital r out[3] pio12/digital r out[2] pio11/digital r out[1] the general purpose input/output signals pio11 to pio15 (5bit) can be switched in that way that the red intensity of the current pixel is output. pio15/digital r out[5] is the msb. pio10/digital g out[5] pio9/digital g out[4] pio8/digital g out[3] pio7/digital g out[2] pio6/digital g out[1] the general purpose input/output signals pio6 to pio10 (5 bit) can be switched in that way that the green intensity of the current pixel is output. pio10/digital g out[5] is the msb. pio5/digital b out[5] pio4/digital b out[4] pio3/digital b out[3] pio2/digital b out[2] pio1/digital b out[1] pio0/digital b out[0] the general purpose input/output signals pio0 to pio5 (6 bit) can be switched in that way that the blue intensity of the current pixel is output. pio5/digital b out[5] is the msb. rout gout bout output pins for the three primary color video (analog) signals used as color source for display. rout is the red video signal output pin, gout the green and bout the blue. all these signal are analog signals output by the viewdac. vbs this terminal is used for noise rejection of dac?s current adjustment bias. it is recommended to connect a capacitance of 0.1 * f to the ground. vref external voltage reference-bias input for the digital-to-analog converter. gdc fsadj current-mirror output. this pin is used to set the current level in the dac outputs via an internal current-mirror. this pin is usually connected to ground via a 745 ohm resistor. dreq0 external dma request signal. dmac dack0 dma acknowledge signal output pin. tx(can1) transmit pin of can channel 1 rx(can1) receive pin of can channel 1 tx(can0) transmit pin of can channel 0 txcan rx(can0) receive pin of can channel 0 pio18/tx(sei)/tx(sio0) in master mode this pin is the data output of the sei interface. in slave mode this is the data input pin of the sei interface. pio17/rx(sei)/rx(sio0) in master mode this pin is the data input pin of the txsei device. in slave mode this pin is the data output. txsei pio16/clk(sei)/clk(sio) in master mode the clock is output during transmission from the txsei module. in slave mode the clock is received from the device the TMPR3916f is communicating with.
chapter 12 package preliminary 12-7 classification pin name pin function pio19/ssi * (sei)/clk(sio1) when the txsei module is configured as a slave the ssi * (slave- select-input) signal shows that the txsei module is accessed in the current transfer. in master mode this pin can be used to check the bus for a second master on the bus. by definition more than one master is not allowed because such a configuration might damage the circuits! txsei pio22/sso * (sei)/rts * (sio1) during master mode the sso * (slave-select output) is used to enable the outputs of an sei device connected to the TMPR3916f. pio29/tx(sio3) pio25/tx(sio2) pio21/tx(sio1) pio18/tx(sei)/tx(sio0) serial data transmit (output) pin. pio28/rx(sio3) pio24/rx(sio2) pio20/rx(sio1) pio17/rx(sei)/rx(sio0) serial data receive (input) pin. pio26/rts * (sio2) pio22/sso * (sei)/rts * (sio1) request to send signal output pin. pio27/cts * (sio2) pio23/cts * (sio1) clear to send signal output pin. uart pio19/ssi * (sei)/clk(sio1) pio16/clk(sei)/clk(sio0) uart clock output for synchronous transfer mode port pio[29:0] 30-bit parallel i/o port pins. ext[2:0] * interrupt request signal input pins. intc nmi * non-maskable interrupt signal input pin. if this signal is asserted the tx39 core jumps to the non-maskable- interrupt service routine. dclk debug clock this pin outputs a clock for a real time debug system. pcst[2:0] pc trace status outputs pc trace status information and the mode of the serial monitor bus. sdao/tpc serial data and address output / target pc dbge * debugger enable the external real time debug system signals to the dsu by asserting this pin, that it is connected. sdi/dint * serial data input / debug interrupt when dsu mode is not used, this pin must be tied to high. dsu 1 dreset * debug reset a reset input for a real-time debug system. when dreset * is asserted, the debug support unit (dsu) is initialized. test test0 this pin is used for manufacturing test purposes. for regular operation this pin must be tied to zero. otherwise the TMPR3916f and connected devices may be damaged. 1 if the dsu interface is not utilized, tie sdi/dint* to vcc using a 47 k ? resistor; leave dreset* and dgbe* pins open.
chapter 12 package preliminary 12-8
appendix a register overview of TMPR3916 preliminary a-1 appendix a. register overview of TMPR3916 classification address register name function 1c00 0000h silcr0 sio control register (ch0) 1c00 0004h sidicr0 sio interrupt control register (ch0) 1c00 0008h sidisr0 sio interrupt status register (ch0) 1c00 000ch siscisr0 sio status change register (ch0) 1c00 0010h sifcr0 sio fifo control register (ch0) 1c00 0014h siflcr0 sio flow control register (ch0) 1c00 0018h sibgr0 sio baud rate control register (ch0) 1c00 001ch sitfifo0 sio transmit fifo register (ch0) 1c00 0020h sirfifo0 sio receive fifo register (ch0) 1c00 0040h silcr1 sio control register (ch1) 1c00 0044h sidicr1 sio interrupt control register (ch1) 1c00 0048h sidisr1 sio interrupt status register (ch1) 1c00 004ch siscisr1 sio status change register (ch1) 1c00 0050h sifcr1 sio fifo control register (ch1) 1c00 0054h siflcr1 sio flow control register (ch1) 1c00 0058h sibgr1 sio baud rate control register (ch1) 1c00 005ch sitfifo1 sio transmit fifo register (ch1) 1c00 0060h sirfifo1 sio receive fifo register (ch1) 1c00 0080h silcr2 sio control register (ch2) 1c00 0084h sidicr2 sio interrupt control register (ch2) 1c00 0088h sidisr2 sio interrupt status register (ch2) 1c00 008ch siscisr2 sio status change register (ch2) 1c00 0090h sifcr2 sio fifo control register (ch2) 1c00 0094h siflcr2 sio flow control register (ch2) 1c00 0098h sibgr2 sio baud rate control register (ch2) 1c00 009ch sitfifo2 sio transmit fifo register (ch2) 1c00 00a0h sirfifo2 sio receive fifo register (ch2) 1c00 00c0h silcr3 sio control register (ch3) 1c00 00c4h sidicr3 sio interrupt control register (ch3) 1c00 00c8h sidisr3 sio interrupt status register (ch3) 1c00 00cch siscisr3 sio status change register (ch3) 1c00 00d0h sifcr3 sio fifo control register (ch3) 1c00 00d4h siflcr3 sio flow control register (ch3) 1c00 00d8h sibgr3 sio baud rate control register (ch3) 1c00 00dch sitfifo3 sio transmit fifo register (ch3) uart 1c00 00e0h sirfifo3 sio receive fifo register (ch3) 1c00 8000h semcr sei master control register 1c00 8004h secr0 sei control register 0 1c00 8008h secr1 sei control register 1 1c00 800ch sefs sei inter frame space register 1c00 8010h sess sei slave select space register 1c00 8014h sesr sei status register 1c00 8018h sedr sei data register txsei 1c00 801ch sers sei read start register 1c01 0000h timer free running counter of periodic timers 1c01 0004h titr timer interval time register timer 1c01 0008h pwmval compare value for pwm counter 1c02 0008h rccr2 rom channel control register 2 1c02 000ch rccr3 rom channel control register 3 1c02 0010h rccr4 rom channel control register 4 memc 1c02 0014h rccr5 rom channel control register 5
appendix a register overview of TMPR3916 preliminary a-2 classification address register name function 1c02 8000h dccr configuration register 1c02 8004h dcba base address register 1c02 8008h dcam address mask register sdramc 1c02 800ch dctr timing register 1c03 0000h pa port data register 1c03 0004h pacr port control register 1c03 0008h pal port interrupt flag 1c03 000ch palmx port edge select for interrupt 1c03 0010h pamsk port interrupt enable port 1c03 0014h pamux output select for port/ txsei/ uart 1c04 0000h irqr interrupt request register 1c04 0004h imaskr interrupt mask register intc 1c04 0008h ilext external interrupt detection register 1c05 0000h dcr display control register 1c05 0010h sara start address register layer a 1c05 0014h sarb start address register layer b 1c05 0018h sarc start address register layer c 1c05 001ch sard start address register layer d 1c05 0020h mwra memory width register layer a 1c05 0024h mwrb memory width register layer b 1c05 0028h mwrc memory width register layer c 1c05 002ch mwrd memory width register layer d 1c05 0030h htn horizontal transfer number 1c05 0034h htnd horizontal transfer number layer d 1c05 0038h hdser horizontal display start register 1c05 003ch hdserd horizontal display start register layer d 1c05 0040h hcr horizontal cycle register 1c05 0044h hswr horizontal synchronous pulse width 1c05 0048h vcr vertical cycle register 1c05 004ch vswr vertical synchronous pulse width 1c05 0050h vdsr vertical display start register 1c05 0054h vdsrd vertical display start register layer d 1c05 0058h vder vertical display end register 1c05 005ch vderd vertical display end register layer d 1c05 0800h cplta0 color palette register layer a number 0 ? ? ? 1c05 0bfch cplta255 color palette register layer a number 255 1c05 0c00h cpltb0 color palette register layer b number 0 ? ? ? 1c05 0ffch cpltb255 color palette register layer b number 255 1c05 0180h cpltc0 color palette register layer c number 0 ? ? ? 1c05 01bch cpltc15 color palette register layer c number 15 1c05 01c0h cpltd0 color palette register layer d number 0 ? ? ? gdc 1c05 01fch cpltd15 color palette register layer d number 15 1c06 0000h odr0 operation definition register 0 1c06 0001h ccr0 channel control register 0 1c06 0002h cer0 channel error register 0 1c06 0003h csr0 channel status register 0 1c06 0004h sar0 source address register 0 1c06 0008h dar0 destination address register 0 1c06 000ch bcr0 byte control register 0 dmac 1c06 0010h odr1 operation definition register 1
appendix a register overview of TMPR3916 preliminary a-3 classification address register name function 1c06 0011h ccr1 channel control register 1 1c06 0012h cer1 channel error register 1 1c06 0013h csr1 channel status register 1 1c06 0014h sar1 source address register 1 1c06 0018h dar1 destination address register 1 dmac 1c06 001ch bcr1 byte control register 1 1c07 0000h ? 1c07 00f0h dpram0 mailbox ram (ch0) 1c07 0100h mc0 mailbox configuration register (ch0) 1c07 0104h md0 mailbox direction register (ch0) 1c07 0108h trs0 transmit request set register (ch0) 1c07 010ch trr0 transmit request reset register (ch0) 1c07 0110h ta0 transmission acknowledge register (ch0) 1c07 0114h aa0 abort acknowledge register (ch0) 1c07 0118h rmp0 receive message pending register (ch0) 1c07 011ch rml0 receive message lost register (ch0) 1c07 0120h lam0 local acceptance mask register (ch0) 1c07 0124h gam0 global acceptance mask register (ch0) 1c07 0128h mcr0 master control register (ch0) 1c07 012ch gsr0 global status register (ch0) 1c07 0130h bcr10 bit configuration register 1 (ch0) 1c07 0134h bcr20 bit configuration register 2 (ch0) 1c07 0138h gif0 global interrupt flag register (ch0) 1c07 013ch gim0 global interrupt mask register (ch0) 1c07 0140h mbtif0 mailbox transmit interrupt flag register (ch0) 1c07 0144h mbrif0 mailbox receive interrupt flag register (ch0) 1c07 0148h mbim0 mailbox interrupt mask register (ch0) 1c07 014ch cdr0 change data request (ch0) 1c07 0150h rfp0 remote frame pending register (ch0) 1c07 0154h cec0 can error counter register (ch0) 1c07 0158h tsp0 time stamp counter prescaler (ch0) 1c07 015ch tsc0 time stamp counter (ch0) 1c07 8000h ? 1c07 80f0h dpram1 mailbox ram (ch1) 1c07 8100h mc1 mailbox configuration register (ch1) 1c07 8104h md1 mailbox direction register (ch1) 1c07 8108h trs1 transmit request set register (ch1) 1c07 810ch trr1 transmit request reset register (ch1) 1c07 8110h ta1 transmission acknowledge register (ch1) 1c07 8114h aa1 abort acknowledge register (ch1) 1c07 8118h rmp1 receive message pending register (ch1) 1c07 811ch rml1 receive message lost register (ch1) 1c07 8120h lam1 local acceptance mask register (ch1) 1c07 8124h gam1 global acceptance mask register (ch1) 1c07 8128h mcr1 master control register (ch1) 1c07 812ch gsr1 global status register (ch1) 1c07 8130h bcr11 bit configuration register 1 (ch1) 1c07 8134h bcr21 bit configuration register 2 (ch1) 1c07 8138h gif1 global interrupt flag register (ch1) 1c07 813ch gim1 global interrupt mask register (ch1) 1c07 8140h mbtif1 mailbox transmit interrupt flag register (ch1) txcan 1c07 8144h mbrif1 mailbox receive interrupt flag register (ch1)
appendix a register overview of TMPR3916 preliminary a-4 classification address register name function 1c07 8148h mbim1 mailbox interrupt mask register (ch1) 1c07 814ch cdr1 change data request (ch1) 1c07 8150h rfp1 remote frame pending register (ch1) 1c07 8154h cec1 can error counter register (ch1) 1c07 8158h tsp1 time stamp counter prescaler (ch1) txcan 1c07 815ch tsc1 time stamp counter (ch1) ccr 1c08 0000h ccr chip configuration register


▲Up To Search▲   

 
Price & Availability of TMPR3916

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X